Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That article makes some really good points, but I disagree. To me, Python is quickly becoming a good middle ground where I can use these powerful functional ideas, then drop down to imperative whenever I need to. In particular, this means that I can use Python to do scientific computing or to easily work with native libraries while still maintaining a lot of the functionality of more pure languages.


Compared to traditional static languages (C++, Java), Python offers an order of magnitude of improvement in productivity.

Compared to older scripting languages (Perl), Python offers a sane language and a rich programming environment.

Compared to other current popular scripting languages (Ruby), Python offers a solid runtime and better out-of-the-box performance at the expense of some elegance and fluency.

Comprare to some very interesting languages (Haskell, Erlang, Scala) Python is more widely available and allows you to produce good, portable, well-performing code quickly and easily.

It's a state of flux. Right now Python is my language of choice (after ten years of Ruby) and it touches that sweet spot of expressiveness and performance. However, the bolted-on features (verbose object system, clumsy metaprogramming) deliberate crippling of language (e.g. one line lambdas) and the underlying message of "there's one way to do it" (which is my way, because I know better than you) will, for me, mean that eventually I will move on. More expressive, coherent and flexible languages will eventually reach Python's current level of maturity and performance, and then it will be time to switch. It could be MacRuby, Scala or F# (but probably not Haskell or Erlang). Who knows.

But, for now, Python is a good choice.

Edit: typos.


>Compared to other current popular scripting languages (Ruby), Python offers a solid runtime and better out-of-the-box performance at the expense of some elegance and fluency.

Although, Ruby doesn't have any iteration constructs as nice as Python's generators. (You could create them using call/cc, but I expect the performance would be awful).


Comprare to some very interesting languages (Haskell, Erlang, Scala) Python is more widely available and allows you to produce good, portable, well-performing code quickly and easily.

Scala code compiles to Java bytecode, and performs comparably to Java code. It's just as portable and performant as Java, which means very portable and fairly performant.


May I suggest Lua with metalua? It seems to have most of what you're looking for (and luajit is very fast).


Lua has a library problem for many tasks.


Lua's design assumes you're comfortable with C. Lua in isolation has a library problem, yes, but in exchange can be small enough a language to learn and know in its entirety.


Such as?


Many/most libraries in Python are built in, so you don't need to hunt them down and install. More importantly your users need only have "Python", nothing more or less and don't have to fiddle to get things working.


But unlike Python, Lua is smaller than SQLite. You can just put it in a DLL and install it with your project. Any users that even notice it would be shocked to see how many installations of SQLite they probably have. :)


I would expand that to say that lua has a standard library and framework problem. You can link any old C library but there's little uniformity in how everything fits together and rather few task-oriented packages/frameworks exist.

I like lua and am using it for some tasks where I'd have used C in the past. But for many things where ruby/python have strong, pluggable libraries (e.g. everything web-related) there is simply no equivalent in lua-land.

Kepler project is nowhere near a django or rails.


Lua's historical niche has been as an extension language for C and C++ projects, not web development. It has the necessary infrastructure at the language level, though.

FWIW, I'm working on a lightweight, event-driven webserver and general server framework (like twisted or tornado). It will be released under a BSD-style license at the same time as my distributed filesystem (the project driving its development).


Comprare to some very interesting languages (Haskell, Erlang, Scala) Python is more widely available and allows you to produce good, portable, well-performing code quickly and easily.

Yeah, absolutely not true. You need to do a little more research before you say very silly things like this.


agreed ... also i think the dynamically-typed nature of python (and similar languages) makes them very amenable to rapid prototyping and experimentation (code just runs without having to fight the type inferencer or checker). python lets you do clean and beautiful functional programming, but also, as you mentioned, to drop down to quick-and-dirty imperative mode

the author has a good point about pure functional languages being better-suited for concurrent programming, though


Just to be clear, Clojure (and most lisps) are also dynamically typed and thus allow just the same experimental approach. Clojure and Common Lisp (I can't speak for other lisps, but I think some schemes too - PLT Scheme perhaps?) also have optional Type Hinting that allow the program to run quickly too.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: