Hacker News new | ask | show | jobs
by snippet22 3551 days ago
To be honest you should look into Python. It's really short code and getting very popular. It uses decorators and those template garbage %> that no one uses anymore (extra). It also is by default the cleanest code and in my opinion the shortest code. It also has a library for everything. It also is the fastest for big data crunching.
2 comments

I don't think comparing a language to two backend and frontend frameworks makes much sense. Especially in the context of a tutorial about the frameworks (not an article evangelizing this particular stack). I mean, if someone posted a Django / react tutorial and I said "You should really look into Rust. There are benchmarks where it's faster than Python. It is also by default the cleanest code and in my opinion the best structured code.", it wouldn't be adding much to the discussion surrounding a tutorial. Is Python a better language than C#? Maybe, but that's not really something the tutorial is trying to argue against and is an entirely different discussion. To me, this is an apple and oranges comparison.
You know, yesterday by happenstance I read a blog post[1] comparing Python (favorably) to Java. It makes the same general arguments as you.

As for "really short code", yeah technically you write `[]` for a list instead of `new ArrayList()`. Unless of course you want different performance characteristics, then you have to write `from collections import deque` and `deque()` which isn't really more convenient or shorter than `new Deque()`.

And yeah you can use the global function `open` and the method `read` to quickly get file contents. But you can write wrapper functions around the Java or C# equivalents if needed. It's just that usually you need more fine-grained control over what's happening than that in real-world code.

And while I'm not really a fan of the `new` keyword or the fact that everything has to be within a class definition, a good IDE makes that stuff painless.

And it's true that you don't have to declare types in Python. But then you lose the ability to control-click a type name of a variable to go to its definition, to know what you can do with it or how it works.

As for "cleanest" code, that's definitely not a matter of syntax or even what the standard library looks like. Clean code can be written in any language. I've seen clean code in Ruby, Python, Haskell, Clojure, Java, C#, Swift, Objective-C, heck even C. (Never C++ though, but I don't doubt it probably exists somewhere.)

As for having libraries for everything, so does every major language, including the ones I just mentioned.

And I sincerely doubt that Python is the fastest for big data crunching. From what I've read, the situation is more like, Python is very popular among data scientists, but they got fed up with how slow it is in general, especially at numbers, so they wrote a Python library for number crunching implemented in C to make it really fast, and now it's like as fast as Java finally.

[1]: http://www.programcreek.com/2012/04/java-vs-python-why-pytho...