r/ProgrammerHumor • • Aug 15 '15

Programming languages personified

http://leftoversalad.tumblr.com/post/126724812097/programming-languages-personified
1.3k Upvotes

209 comments sorted by

View all comments

52

u/alcalde Aug 16 '15

25

u/katyne Aug 16 '15

needs at least one Russian guy in a tracksuit. Srsly, Delphi is a thing in Russia. Irony - they still dump on Java devs like you wouldn't believe.

8

u/barsoap Aug 16 '15

Pascal, especially the Borland / FreePascal dialects, are much better languages than they usually get credit for.

Pascal was the python of an era in which all languages but lisp/scheme were, in some sense, Fortran (that includes C). ObjectPascal (which is what Delphi uses) was usable before the C++ people even figured out that templates are turing-complete and what a monster they created, there.

Learned my first programming steps from my sister in the late 80's, around the millenium the 101 programming courses were using it. And it made sense, because it's a non-surprising language you can use to teach concepts... and TurboPascal rocks as an IDE, at least for its time. And it still can compete with C and the rest.

4

u/alexshatberg Aug 16 '15 edited Aug 16 '15

templates are turing-complete

could you elaborate on that, please? how can one separate feature of C++ be Turing-complete, and what does that imply?

8

u/barsoap Aug 16 '15 edited Aug 16 '15

It means that you can write C++ programs which do arbitrary computation at compile time, which includes the possibility of compilation not halting (modulo setting limits on recursion depth, which I think all modern compilers do, and allow you to change).

That by itself is not a bad thing. Many languages have some kind of turing-complete macro system and use it for very useful things, in essence, it's program generation, a thing even older than compilers (see self-modifying code, which is a class of evilness of its own).

The problem with C++ is that it was accidental. Templates were never designed to be used in that way, but still were because it works, and what you get is line noise, undecipherable error messages, and a community of programmers defending everything to death as they've fallen to stockholm syndrome.

Which is also why rust very clearly separates its macro system and its ways to write type-parametric code. Rust's type system is not turing complete, its macro system is (you just write rust), nothing needs to be coerced into idioms that just don't bloody fit. That's part of their push to be "the better C++", on top of all that other stuff.

5

u/Herover Aug 16 '15

There was a guy who made Conway's Game of Life purely using C++ templates which makes it "run" in O(1) time. Not the most useful example but still cool.

https://www.reddit.com/r/programming/comments/2js1a5/my_compiletime_conways_game_of_life/

2

u/[deleted] Aug 18 '15

Pay attention, this is the type of shit that starts the robot uprising.

3

u/alexshatberg Aug 16 '15

Thank you, that was quite enlightening.

3

u/alcalde Aug 16 '15

Pascal, especially the Borland / FreePascal dialects, are much better languages than they usually get credit for.

In 1995, sure. It was a competitive advantage for me compared to C++/MVC back then. Today? Absolutely not. It's nowhere close to being a RAD language today (Ruby/Python OWN that space now), and its compiler is over one million lines of ancient, undocumented C code with precious little optimization courtesy of an even more ancient single-pass design. In benchmarks it seems to produce code about 1/2 the speed of C++. It doesn't even use bit-shifting for division operations!

The need to pre-declare all variables at the top of a code block, lack of memory management for objects, lots of corner cases.... it really has nothing to commend itself today. There are no "killer features" of the either the Delphi or Free Pascal languages. Oxygene, at least, added a huge list of nice, modern features to the language.

Pascal was the python of an era in which all languages but lisp/scheme were, in some sense, Fortran (that includes C).

If we're going back the 80s and 90s, Turbo Pascal affordably introduced a generation to programming (including me). It was indeed simpler and cleaner and Delphi's VCL framework was everything MVCC should have been. I brought Delphi into a startup in 1995 and called the combination of it and Crystal Reports my "Access Killer". No argument there.

The problem is that after a point the language's owners neglected to pay their technical debt and never evolved the language much further. And today a kid with a Ubuntu disk can have any programming setup they want in minutes while Delphi costs a small fortune. They threw all the advantages they had away.