5 ms·
The scripting languages are all really more alike than different. The main downside of Python compared to, Ruby, for example, is that Guido made some serious m
by cageface 14y ago
The scripting languages are all really more alike than different.
The main downside of Python compared to, Ruby, for example, is that Guido made some serious mistakes in the initial design and in the process of fixing them added a lot of extra complexity to the language. Python doesn't cleanly "fit in the head" the way Ruby or JavaScript do, at least for me.
But instead of wasting time micro-optimizing in such a narrow language space, pick Python or Ruby or whatever and spend your extra cycles on something different enough to be worthwhile like Go or Haskell.
- cageface 14y agoI also think the python 3 transition came at a bad time. There are a lot more strong alternatives to python now than there were when the transition was planned so putting up with the hassles of migration is enough for some people to consider how green the grass might be in another field. Guido always said he could only afford to break python once but it's not clear to me he'll even get away with once.
- masklinn 14y ago> Python doesn't cleanly "fit in the head" the way Ruby or JavaScript do, at least for me. I find the severe breakages and insanities of Javascript (such as tracking what `this` is) take much more brain-space than Python ever did, personally.
- VeejayRampay 14y agoThat "this" business is absolutely ridiculous. The fact that Javascript remains the SOLE language to script browsers in 2012 really really pisses me off. It is not a very good language in terms of design (even though it's been proved to be quite efficient and capable in the past few years).
- lost-theory 14y agoDid you learn python after you learned ruby or javascript? I have the exact same complaint about ruby not fitting in my head, and I think it's because I learned python first.
- masklinn 14y agoI think part of the problem comes from them being so close syntactically and semantically, it puts the second one you learn in the uncanny valley, just close enough that your brain tries to reuse previous knowledge, just far enough that it can't and you get frustrated. I think that's especially the case if you don't have many languages under your belt. When going from Python to Haskell, or Ruby to Erlang, you can't get confused between the two.
- TazeTSchnitzel 14y agoThis is true, I've tried to write Python code in CoffeeScript, for instance using Python's range() or the colon at the end of the beginning of a block.
- kamaal 14y agoPython is easy. Learning easy things and getting used to them makes learning difficult things tougher later.
- dalke 14y ago"The scripting languages" is a very broad category. I think Python is rather different from Tcl, AppleScript, csh, JCL, MATLAB, and VBScript, to name but a few well-known scripting language. Ruby is definitely closer to Smalltalk (a non-scripting language) than it is to PHP (a server-side scripting language). So I don't understand your comment about it being a narrow language space.
- recursive 14y agoI learned python first, and I have the same complaint about ruby. When I was attempting to learn ruby, the subtle differences between blocks, procs, and proc.news, or whatever they are, seemed arbitrary and required too much thought to understand for my taste. In my brief exposure to ruby, that was symptomatic of a general trend in the language that there seemed to be many ways to accomplish a task, without a clear reason for the distinction. That's fine if you're writing code, but imo that's a feature that makes reading a language more difficult.
- masklinn 14y ago> When I was attempting to learn ruby, the subtle differences between blocks, procs, and proc.news, or whatever they are, seemed arbitrary As well as blocks not being first-class objects. Especially knowing a smattering of Smalltalk, that still feels weird.
- VeejayRampay 14y agoYou don't have to learn every single way to achieve a task though. Just sticking to simple blocks will solve 95% of the issues for you. If you want to get into more detail, Ruby will grow with you. I've sincerely yet to explicitly use lambdas or Procs and I've been coding Ruby through Rails for a few years now.
- recursive 14y agoLike I said, that's fine if you’re only writing code. It doesn't stand up so well if you need to read code also. The author of the code could use any feature the language provides.
- wonderzombie 14y agoI endorse Go as a substitute for Python. Seriously! It may read like a spiritual successor to C, but in practice, with type inference, GC, and struct/map/slice literals, it's very (as the golang people put it) light on the page.
- tikhonj 14y agoI think "scripting language" is not the fairest identification. But not for the reasons most people don't like it: quite the opposite! For me, the issue is not that you can use Python or JavaScript for general-purpose development--although, of course, you can--but that you can actually use Haskell for scripting. And it's actually very good at it, too! I've been replacing my shell scripts with Haskell scrips lately and the transition is going well. Soon the only two languages I will ever need are Haskell and elisp!
- xyproto 14y agoIf only elisp was replaced with Haskell. One day, one day.
- rbanffy 14y ago> Python doesn't cleanly "fit in the head" the way Ruby or JavaScript do, at least for me. I imagine the order on which you learn is important. I learned OOP with Smalltalk and C++ not only didn't fit in my head, it created an impressive allergic reaction. It took me 8 years to be able to get back to it and finally learn. And it still feels a horrible kludge. I learned Python before I had contact with Ruby and I find the irregular syntax hard to parse.