The only reason to write in a language like C or Java today (over Python) is speed. And there are a very limited number of applications that require that sort of speed. There's no question that Linux should be written in a low level language, or a high-performance chess bot. But I'm incredulous when I see anyone write a website in even the relatively high-level Java. So, the author is right that we're getting more Py…
Some people really want static types.
Someday we will all program in Python
11–20 of 80 posts
Re: Someday we will all program in Python
#12While I appreciate the general sentiment that high-level languages will take over the world, there is very little that's new in this article and I am not impressed by the showpiece Python code from the article. For loops are the future?
Re: Someday we will all program in Python
#13Or how about in Clojure? (map (partial reduce +) (partition 7 7 daily)) Edit: Possibly that should be partition-all from seq-utils to sum the remainder days if the length of daily isn't divisible by 7.
That's pretty unreadable for someone who doesn't know clojure.
And that Python is pretty unreadable for someone who doesn't know Python.
Re: Someday we will all program in Python
#14>I believe the flaw in the argument is that the higher-level languages are actually more constrained, because they have made too many broad promises and are unable to tell when they can violate them without ill effect, even though it is obvious to the programmer. We might think that your example above would be a perfect case in which we could parallelize the loop... but what if sum() had side effects, such that it would produce the wrong result if not evaluated in order? What if sum() didn't have any directly detectable side effects, but called another function which called another function which did... sometimes, from code in a runtime eval? The compiler has no way of knowing this, so it has to assume the worst, and this is why it ends up being unable to make all the optimizations that one thinks it "should" be able to make. The human looks at it and says "duh, it's called 'sum'. If it has side effects, I'm going to smack somebody up the side of the head" and proceeds to optimize in the expected ways.<
Re: Someday we will all program in Python
#15The only reason to write in a language like C or Java today (over Python) is speed. And there are a very limited number of applications that require that sort of speed. There's no question that Linux should be written in a low level language, or a high-performance chess bot. But I'm incredulous when I see anyone write a website in even the relatively high-level Java. So, the author is right that we're getting more Py…
Plenty of software is not web-based or a cron job for Linux.
Java, C# are chosen not just because of speed.
You can get vendor support from Sun for their JVM stack. You can (try to) get similar support from Microsoft for .Net stack.
Then also there are personal preferences ::
. Static Typing can be a key part of how people build complex systems in a way they feel comfortable with. When my team codes that way, may bugs are picked up at compile time versus deploy time.
. JVM has really nice remote debugging
. JVM is much closer to run-anywhere than Python
. JVM exits with hs_err files logged
Re: Someday we will all program in Python
#16Earlier quoted context omitted.
Some people really want static types.
More people than you'd think, hence the current fashion for "unit tests".
And I think it's a stretch that people who use unit tests are just trying to compensate for a lack of static types. Actually, it's more than a stretch, it's false for pretty much any competent programmer.
If it were true, why would Java programmers use JUnit?
Re: Someday we will all program in Python
#17[edit:] if only... Amend to: some day, we will program as efficiently as possible, and software will do most of the annoying housekeeping.
Re: Someday we will all program in Python
#18Or how about in Clojure? (map (partial reduce +) (partition 7 7 daily)) Edit: Possibly that should be partition-all from seq-utils to sum the remainder days if the length of daily isn't divisible by 7.
As of June 20th, there is now an optional padding argument in clojure.core/partition.
Re: Someday we will all program in Python
#19The only reason to write in a language like C or Java today (over Python) is speed. And there are a very limited number of applications that require that sort of speed. There's no question that Linux should be written in a low level language, or a high-performance chess bot. But I'm incredulous when I see anyone write a website in even the relatively high-level Java. So, the author is right that we're getting more Py…
There are Smalltalks that ditched (in one case all) their "primitive" methods written in C against the VM internals because the JIT compiler turned out to be good enough. (Agents for the all case. VisualWorks also lets much of the Dictionary functionality JIT to machine code with no primitives.)
The evolution of programming languages will never end, not in our lifetime certainly, and probably not as long as we walk the earth.
You forget to mention a big factor: speed of cultural transmission. Considering what Lisp, Smalltalk, Self and other languages have been able to achieve for high level languages, why are we still dealing with poky high level languages like Ruby and Python? A part of it is cultural expectations. We still expect HLL to be an order of magnitude slower, even though that expectation is decades out of date, technologically. (HLL should only be 70-50% slower now.)
Re: Someday we will all program in Python
#20Earlier quoted context omitted.
More people than you'd think, hence the current fashion for "unit tests".
Static typing hardly replaces unit tests. And I think it's a stretch that people who use unit tests are just trying to compensate for a lack of static types. Actually, it's more than a stretch, it's false for pretty much any competent programmer. If it were true, why would Java programmers use JUnit?
Best of both worlds -- optional static types as in Strongtalk. I can imagine development methodologies that demand you statically type everything before you release to production. This way, you get fast duck typing development and the security of type safety for the maintainer.