Hacker News new | ask | show | jobs
by cageface 2176 days ago
Python is an uninspired language with one serious design flaw (significant whitespace) that gained a lot of initial momentum because it was better than Perl. Since then it's accumulated new features in a random thrift store sort of process that has resulted in a fairly complex language.

In my opinion this whole generation of slow, dynamic, single threaded languages like Python, Ruby, and PHP only became popular because they were easy to implement and more productive for simple things than the statically typed alternatives of their day. Language design has come a long way since then and we can now do much better.

2 comments

How is significant whitespace a design flaw? Have you ever seen a professionally written program in any language where care in formatting did not extend to having whitespace under control? Gofmt comes to mind. Taking this reality that everyone cares about white space and making it a first class citizen is more of a stroke of genius than a design flaw IMHO.
On the other hand, taking the reality that everyone cares about white space, it makes enforcement of whitespace irrelevant while it makes copying and pasting and auto formatting code very very annoying or even impossible in some cases.
It makes things that are trivial in other languages like copying and pasting chunks of code around or auto formatting code as you type into a very hard problem just to save some delimiters. It looks nice in code samples but sucks in real production codebases.
I am sorry I am replying so late, but seriously: you are copy-pasting code? Don't repeat yourself!

One more case of Python making good things easier and bad things harder!

Same thing with auto-formatting code as you type: IDEs are toxic you know, you would be more productive with vim.

I'm new to programming, and started a project recently using Python. What other languages you recommend that would be better?
I am not fan of the Python but I recommend you stick to Python for your first steps. It has very good community lots of tutorials, books, etc and lots of packages. It is in general a good language for people that are new to programming. After you master Python you may pick other language.
I'd recommend JavaScript unless you want to do something that python is specifically good for like machine learning. JavaScript has its own issues but it's not hard to learn and is used everywhere.
What brought me javascript from python was:

- functions were defined with `function` keyword instead of `def`

- variables were declared with `var`

Julia is pretty great and has significantly saner package management.