top | item 19876747

(no title)

vukonen | 6 years ago

Python is just an arbitrarily chosen glue language in regards to data science and machine learning. Pretty much all the heavy lifting (where having a lot of control is required for performance) is done by modules written in C or C++.

There's not a lot of difference between usage of such modules in Python "hiding" complexity and abstractions used in Java, C#, C++ or Rust except those languages don't actually need to use FFI to get acceptable speed. Computer Science is pretty much just layers and layers of abstractions and the level of abstraction that Go or Python chose to operate on isn't special in any way.

discuss

order

typon|6 years ago

Can you show me code that looks as succinct and clear as numpy or Pytorch, but written in those other languages you mentioned

vukonen|6 years ago

Numpy is written in C and PyTorch is written in C++. If you mean their APIs, you are right that they are more pleasant to use in Python, but that's because Python trades off performance and control for convenience and ease of use.

I only meant to say that in my opinion something like C++ "hiding" behavior in libraries, classes or through operator overloading is not different from Python where easy to use modules hide extreme amounts of complexity. In fact, C++ is better, because it uses FFI way less than Python and by being a lower level language it limits the maximum possible difference in abstraction level between visible and "hidden" code.

marcosdumay|6 years ago

It's not really arbitrary. Python is an outstanding glue language, maybe Ruby or Haskell could compete (how is Perl6 nowadays?), but none of those you mentioned.

lizmat|6 years ago

Rakudo Perl 6 is doing very well indeed, thank you. First official release in December 2015, second official release in November 2018. Monthly developer releases. See https://perl6.org for more information.

vukonen|6 years ago

I agree that Python is great as a glue language. Maybe "arbitrary" wasn't the right word to use. What I meant was that Python hides what actually happens in exactly the same way that lower level languages do, just at a higher abstraction level.