25 Comments

I didn't claim that more plasticity always wins. But win or lose, a highly plastic human nature won't leave much of a legacy. A highly rigid human nature at least leaves a legacy, if it wins.

Expand full comment

In my circles, "everybody knows" that C++ is an abomination that has virtually no advantages and many disadvantages as compared to C.

A phenomenon that I always found weird - having strong opinions like this. Clearly C++ is used a lot more than C nowadays. Got to explain this. Obvious explanation, it is pretty much a superset, and is slightly better. Screwed up explanations: some sort of massive C++ conspiracy or what ever. Ditto for Fortran, why it is still used? Because other languages don't improve much upon it's feature set, while getting in the way of optimizations. plus tools not existing. For any more exciting explanation need proportionally more evidence.

Expand full comment

It's hard to make general sweeping claims about programming languages - there are a lot of different mostly-closed ecosystems, and from the inside it seems like everybody in the world is using the same programming language.  In reality, both technical needs and culture make a huge difference in what is the best programming language.

For example, the statement "C++ is better than C pretty much always" is not something I thought I'd ever hear anyone say.  In my circles, "everybody knows" that C++ is an abomination that has virtually no advantages and many disadvantages as compared to C.

As another example, I once talked to a fellow who programs targeting systems for long-range missiles.  He only programs in Pascal, as he believes C isn't strict enough about data types.

Assembly certainly wasn't dead before we had good optimizing compilers.  For computer games in the early 90's, for example, it was common to write graphics routines in assembly since it was much more efficient than C.  And it probably isn't dead now.  While you can't write Windows drivers reliably in anything other than C and sometimes C++, I believe folks still use assembly for other systems quite a bit, particularly on specialized hardware.

Pure functional, declarative, and logical programming are used quite a bit, though again it depends largely on application.  There are people using Haskell in various fields.  And it's weird to see a list of non-pure functional languages in widespread use without reference to Emacs Lisp.

Expand full comment

I would agree with hierarchy (I even use python a fair bit myself when appropriate, and I have Lua scripting in game engine I developed), but not with the common fallacy of assuming that the gaps are equal sized.

C vs assembly: an enormous gap. Portability, readability, everything. Assembly is dead except for very special cases, and been dead long before the compilers got very good at optimizing. That's how much of a gap it is.

Java vs C: the memory management in C is annoying and string handling is especially; the Java is to enough extent a superset of C to be better than C, if we don't care about memory footprint and other quirks.

Python vs Java: Java is verbose and relatively inflexible when extending the functionality of existing classes, whereas Python is difficult to re-factor because you can't rely on compiler errors when you change the libraries. This sounds trivial but seems to begin to really suck for big projects.

Lisp: try doing scientific computing in it. Easily as silly as writing web applications in C++ . . ML: never used it, and from what i seen of it, hopefully never will.

C++: What I primarily use, and what the industry i work in (computer graphics software, simulation software) uses. It is sufficiently close to scientific computing that things like LISP simply do not fly.

My overall position is: programming language is a form of human-machine interface and as such really has no business sacrificing usability for sake of purity. Any language where the designers decide, okay, operator overloading is unnecessary and evil and goes against our maxims, is not even worth looking at (from my point of view as programmer that does a lot of applied mathematics), not because the operator overloading is that important (it isn't) but because its a good proxy for attitudes of language designers and users of that language.

Expand full comment

Michael, I'm a very experienced programmer in business for myself (what's called a contractor, so I see the insides of many companies in Cambridge, which is the European tech centre). I have used commercially all the languages referenced above, except C# and F#, which are Microsoft versions of things I have used.

I don't have any non-anecdotal data on ease of programming, but I think the hierarchy

Assembler > C > Java > Python

Is beyond dispute amongst everyone who has used all four for significant work.

It works both ways. Assembler will take the longest to write, and will run the fastest, and will be hardest to modify and make correct. Python allows you to knock up solid programs very quickly, but runs very slowly in comparison.

There are many caveats, and often the best option is to write the program in python and then translate the bits where the computer spends the majority of its time into something faster (usually C), getting the best of both worlds.

C, ML and Lisp all have a 'clean' feeling about them, which is very attractive to the mathematically minded. 

They're the three languages I'd use for pleasure, and there are many theoretical arguments in their favour. ML and Lisp promise python-like expressivity and C-like execution speed, and often live up to their promises.

C is very mainstream, but the other two, despite being ancient and widely respected, have never been widely popular in commercial circles. This is inexplicable to their fans, including me. I suspect that there is some sort of network effect that makes them better for someone working alone than for teams of people, but I don't know what it is.

On the other hand, a couple of years ago I worked for a small startup called XenSource, that was sold to Citrix for something like £500 million. We used many languages, but the complex and difficult stuff was all done in ML, and that was a rewrite of a program that had originally been done in C, and been found to be undebuggable and unmaintainable in that form, and so rewritten by the team responsible for it in their preferred language. They reported that it was much easier to maintain, understand and modify that the original C version, which I never saw.

There may be some sort of handicapping effect going on, where by using the academic, mathematical type languages you're ensuring that you only employ very clever programmers. 

I think everyone agrees that a couple of good programmers are worth a couple of hundred average ones, for almost any task. But it's very hard to work out who's good in advance.

Expand full comment

He'd be an awesome example of a language zealot. Somehow the most amazing languages are always among the least used; my explanation is that the less a decent language (LISP is a decent language) is used, the more people who like that language write about how great it is, trying to improve the situation. The zeal grows faster than the numbers fall off.

edit: also, http://www.aaronsw.com/webl...

Expand full comment

http://alarmingdevelopment....

I think its actually a very common belief among programmers that you get rapidly diminishing returns past C  . There are some differences, of course; sometimes it is very annoying when you have no coroutines in the language, sometimes it is very annoying when you have no reflection, and so on, but it doesn't make a lot of difference at that point.

Expand full comment

The fanatics claim, if true, would have quite a lot of real world consequences.

There's always support in favour of what ever language, when it is anecdotal without anything resembling case-control environment. The difference spans everything including really small examples. When you set up programming contests, difference somehow disappears, with a zillion excuses for disappearance of course. When you have economic competition, again, the supposedly much better languages somehow fail to assert their dominance.

I'm not saying that they would be identical, just that the difference from the fancy favourite features of some language is much smaller than claimed.

It may be up to how much the language is annoying particular person. I find lack of reflection in C++ incredibly annoying, for one thing. But is it a big drag in development? Not really.

Expand full comment

 Paul Graham said that there were things he could write easily in LISP that he probably couldn't have written at all in C++. (http://paulgraham.com/avg.h...

Expand full comment

 Fortran is very well adapted to its niche: numerical computing.That's one of the last areas of computing where you really want to squeeze every bit of performance out of your hardware, and it is very difficult to beat well-optimized Fortran code at its own game.

Only recently C++ code with heavy use of template meta-programming and modern compilers became able to compete with Fortran at numeric computation.

Are humans particularly well adapted to some ecological niche? Currently it doesn't seem so, in fact humans are one of the most generalist species that ever appeared on earth.Maybe in the far future humans as we know them will be replaced in every niche except a narrow one, but that doesn't seem very likely.

However, I don't think that would be a problem. I don't buy the AI-from-first-principles or even the brain uploads as likely replacements for humanity. It will be probably natural evolution plus some genetic engineering plus possibly some cybernetic augmentation: humans as we know them will be replaced by their descendents in the same way that sons and daughters replace their parents.

Anyway, if you discount future utility, there is no real reason to care about very distant descendents. After all, interstellar travel may well be technologically impossible, so when the sun runs out of juice, it will be all over.

Expand full comment

The fortran as a language is only standing less in the way of allowing optimizations, IMO.

When you try to go fancier, you either burden human with second guessing the compiler to write code that compiler would be able to optimize (when you rely on compiler to get from O(n^2) to O(n) or the like), or prevent compiler from doing optimizations (due to pointer mess in case of C which makes it hard to optimize safely), or both.

Expand full comment

which might have to have finally got the interoperability issue rightwhich might have finally got the interoperability issue right

Expand full comment

 Well, I don't think that differences don't matter.

Unless you need extreme low-level optimization Fortran is better than Assembly and C is better than Fortran. C++ is better than C pretty much always.

If you are willing to sacrifice more efficiency, then it's Java and C# over C++ (and C# over Java), and if you accept further overhead, then Python wins hands down.

Note that these languages all use the imperative programming paradigm (extended with object orientation). What about different programming paradigms?

The pure functional paradigm of languages like Haskell and Clean is just of theoretical interest. It is useful only in the same sense that math is, but you can't use it to do any practical programming. Ditto for logic programming.

"Impure" functional programming languages such as the ML family and multi-paradigm languages such as the Lisp family, on the other hand, are quite convenient to use after you are familiar with them, and some of their implementations are quite optimized (performances similar to Java and C# are reported), but, with possibly two exceptions, they aren't widely used. I think that the problem is that these languages are not very much interoperable with existing software, partly because were developed mostly in academic contexts and partly because there is some "impedance" between different paradigms.

The two exceptions I was thinking of are Wolfram's Mathematica, essentially a Lisp derivative but with significant changes, which is widely used for scientific computing, and possibly Microsoft F#, an ML derivative which might have to have finally got the interoperability issue right and appears to have some significant use in financial computing (we'll see if it's just a fad).

Expand full comment

Is that because these fanatics like being fanatics, or because they have data that supports their fanaticism?

Expand full comment

There are oddles of LISP and Ruby fanatics that would say that dmytryl is full of crap.

Expand full comment

"At the other extreme, if human nature is very plastic, then it will adapt to most changes, and change to embody whatever innovations are required for such adaptation."

More is always more? No diminishing returns? No optimal level of plasticity?

Psych researchers found evidence decades ago that people organized into groups had optimal levels of freedom. Neither highly authoritarian nor completely laissez-faire envirnoments were best for optimal creativity or productivity. Something between these two extremes worked best.

Same for plasticity, IMO.

Consider competition. Is competition purely a function of the number of competitors in a given domain, or is it also an (inverse) function of the scope of the competition, whereby the narrower the scope for changes is, the more innovative the actual changes will be? That is, more and greater constraints equals more innovation within them - assuming a reasonable level of freedom, otherwise.

For intelligent systems, constraints are not or not only limits and boundaries, they are catalysts for innovation and creation. This includes our genetic constraints, IMO. Therefore, the following is not necessarily true:

"But then there would be very little left of us by the end; our descendants would become whatever any initially very plastic species would have become in such an environment."

Expand full comment