4 ms·
I don't think Python lacks much, if anything. It's a very fine language, with a great community. Over the years though, I just lost interest in it, and have c
by davidw 18y ago
I don't think Python lacks much, if anything. It's a very fine language, with a great community. Over the years though, I just lost interest in it, and have come to prefer Ruby after having rediscovered it because of Rails. It's pretty much a matter of taste: I like the syntax and convenience more.
One (fairly minor) real world case where the syntax makes a difference is in web templates: you can use Ruby pretty much straight up to do templating, but Python requires more hoops and hacking, due in part to the whitespace issue. I like the fact that Ruby is flexible enough to be used as-is for templates as well as other code. BTW, it also needs to be said that that is the only place I've ever noticed the whitespace issue being any kind of problem: it's not the big deal that some python detractors make it out to be.
In short: if you're happy with Python...great! Keep using it, you made a good choice. If you want to learn another language, pick something a bit further from it... say, Erlang, Tcl, Java, or C, depending on what your needs are.
- gaius 18y agoNote that Python is sensitive to indentation not whitespace per se. So long as your line is at the right level there's no difference between a=1+2 and a = 1 + 2 In fact I wish Python were more sensitive to whitespace, then I could say my-variable without it mistaking a hyphen for a minus.
- rbanffy 18y ago"then I could say my-variable without it mistaking a hyphen for a minus" That's something cool. It would involve a new PEP and aggressive enforcement of PEP 8
- gaius 18y agoReckon it'd break too much existing code, but hyphens are so much nicer than underscores or interCapping. Using a language that supports that, my hands are noticeably more comfortable without needing to reach for the shift key all the time.
- derefr 18y agoyou could just use a font that renders underscores differently (like, say, slightly stylized hyphens.) That's the correct approach, semantically--when you use an underscore, you're basically trying to say "a space, but without the syntactic meaning of one."
- gaius 18y agoIt's not about how it appears on screen but about the keystrokes needed to enter it. If I could I'd find a way to use only square brackets too. Ideally I'd use only ; or : and only ' or " too, and adjust my keymap accordingly.
- nostrademons 18y agoLisp? ;-)
- ericlavigne 18y agoThis is one of the advantages of Lisp. It is common for Lisp programmers to map the [] keys to () and vice-versa. Since Lisp requires so few of the keys, such mappings can prevent you from needing to press the less comfortable keys.
- jacobolus 18y agoIt is not hard to remap your key bindings if you find `_` too hard to type.
- gtani 18y agoHAML: kinda looks like python, if you stand far enough back from the monitor Python's got dozens of ORMs, templating libs, web frameworks, unit test libs. The embarassment of riches definitely an issue, you could spend a week reading about python ORMs alone.