Why Reddit uses Python
brainsik.theory.org
brainsik.theory.org
It's more a mindset thing than a language thing - and your vocabulary exposed it better than any second hand description could have done.
You're completely misinterpreting what he is saying.
"I don’t think we’ve yet hired an employee who knew Python. I just say, “everything you write needs to be in Python.” Just so I can read it. And it’s awesome because I can see from across the room, looking at their screen, whether their code is good or bad. Because good Python code has a very obvious structure. And that makes my life so much easier."
Which boils down to: I make them use python to be able to control them better. It is legitimate for a boss to do that, he pays you after all. But it's hardly groundbreaking new management style or a good criterion for choosing a language.
I also can see why you are sympathetic to this. I know the good feeling when you know the language so well that you can see across a room from the shape on the screen wether it is good code or bad code. I love that myself.
Please tell me this is a joke. He may be able to tell whether the code is unreadably bad, but that's about all.
Come to think of it, that's true for most languages that don't have Java-style static typing annotations interspersed throughout. Functional and imperative code in OCaml or Lua code look noticeably different, too, and there's not a whole lot of stylistic overlap between OCaml, Scheme, and Python's syntaxes. (Lua's is relatively similar to Python's.)
from pg's On Lisp
I've seen this proved wrong time and time again. Have you ever been maintaining some shipped code, and found a crash bug, where you're like: "I can't believe this shipped and we haven't heard about it."
So, I'm probably treating this out-of-context comment more seriously than it deserves, but I like to emphasize the point. Even though there is a set of errors that are detectable from the shape of the source code, there is a much larger set of serious errors that are not.
Incidentally: getting me to key points of the talk without requiring 26 minutes of watching low-information-density video is a value-add for me.
If they actually want to watch the video. I skim articles. I can't skim a video.
Something hardcore lispers don't fully understand.
That is what most people don't understand.
There is a best language. It just varies from programmer to programmer. Also picking the "right" language for the job is overrated. Should pick the "right" language for the developer(or switched around pick devs who's right language is the one your code base is written in.)
In my short experience with several popular languages, there are certain niches for development. E.g. high-level web development (Python, Ruby, Perl), complex enterprise development (C#, Java), video games and embedded (C), general desktop software (C#, C++).
Within the niche, it is perfectly fine to chose any language within niche. However, to use langauges across niches is quite troublesome. No one cares if you use Ruby instead Python to write a web-site but people would raise eyebrows if you use C (counter-example: eBay).
Apparently their site is ~200k lines of C++
Web dev: There is tons of Java web dev junk Tomcat and all that. MochiWeb and Yaws are Erlang web platforms.
Video games: Eve Online is mostly Stackless Python with some C++ libs.
General desktop software: (not sure what this category means) but wings3d is written in Erlang, plenty of examples here http://pypi.python.org/pypi?:action=browse&c=32
Complex enterprise development: I doubt there is such a beast written in only one language. And I argue that Java is used because it is close to best for hordes of programmer drones working for enterprises. The non-hordes are why jruby, jython, scala are becoming popular.
pg did the airline ticket thing in Lisp cause it was best for him.
You claim short experience and reiterate long held stereotypes. I claim 20 years of experience and see a vastly different picture than you do.
I think the real problem is languages that don't have clear mechanisms in place for co-operating with other languages (and their libraries). Without an FFI or other integration, you're stuck with a languages' weak points. It's too easy to get bogged down rewriting everything in Lisp (or whatever).
* Granted, I don't like Perl (the heart of which is a sort of sprawling mega-awk).
Honestly, Python claims to sacrifice expressiveness and writibility for readability. That whole "there's only one way to do things" is the opposite of expressiveness.
If you want to optimize for writibility and expressiveness, you want a language that won't prevent you from doing anything you want to do. Lisp is definitely one of these languages.
Anyway, your comment reads of blatant fanboi-ing. If you like Python, that's great, just say that instead. It's much better than inventing bullshit "reasons".
From my understanding, the "there's only one way to do things" idea generally applies at the smaller scales, so an argument could be made that it helps with expressiveness at larger scales, since once you know the idioms you don't need to choose between them - ie you can just type it in and keep going and save the mindspace that making a choice between the multiple equivalent options would have required.
Of course, that only makes sense if the "one way to do things" is eliminating choices that are 100% functionally identical, and you can also get bitten if you need something just outside of what the idiom can do nicely, but I thought it was a point worth bringing up.
Functionally identical patterns of code are not equivalently expressive. Certainly the computer doesn't care, but code is written for humans first and foremost. The more ways I can express a functionally equivalent operation, the more expressive the language is. This is because (ideally) each of the different ways has a unique feeling to it that evokes the right intuition needed in the right contexts.
It appears that we were using different meanings for expressiveness though - yours was focusing on communicating both the feel and the function of the code, mine was focusing on communicating efficiently[1].
I don't think that they're orthogonal, and I'm not sure at the level that "there's only one way to do anything" is normally applied in Python that it negatively effects either, especially since the implied full version seems to be "there's only one way to do anything if you don't have a reason to do differently".
Not that it helps with communicating the feel of an algorithm, but at least it doesn't necessarily hurt. I was only trying to point out that "there's only one way to do things" may not actually be the opposite of expressiveness. Liberally applied it's possibly neutral or better.
[1] An argument could be made that accurately communicating the feel of the code is the most efficient way to communicate it, although I'm more concerned with the time it takes both to read and to write the code - surely at some point of massaging your code for readability you reach the point diminishing returns :)