Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
If programming languages were Harry Potter characters (heeris.id.au)
129 points by yulaow on March 5, 2015 | hide | past | favorite | 61 comments


COBOL

If ever there was a language that comes close to matching the more notorious aspects of C, COBOL is the most likely culprit. Coming about in the same era as the venerable FORTRAN, the two languages together ran on mainframes everywhere in the early days to mung through endless business data, speeding up calculations previously done by hand, all in the name of "the greater good".

However, while their early goals were the same, FORTRAN opted for a bit more structured, concise approach, using strongly typed vars and adopting a few of the newer ideas along the way. COBOL, however, remained reliant upon horribly verbose incantations, and refused to cease use of unforgivable spells such as "goto".

FORTRAN went on to be a venerable, yet eccentric language regarded to this day as fastest in some of the more arcane calculations after so many years past its prime. COBOL, however, has for its crimes been largely ridiculed and its practice considered one of the darkest of magics. It has been relegated to the proverbial jail tower, its practitioners shunned. The famous wizard Djikstra once stated "The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offense."

COBOL is Grindelwald, a crippled old relic rotting away in long forgotten mainframes.


Brilliant!


I'm surprised that people consider C a dead language.

C is very much one of the most used and needed language in the world, especially if the Internet of Things hype keeps on getting stronger. And of course all the current billions of lines of C didn't just disappear to be replaced by Python ( as much as I like Python). Your OS and core programs are still getting new versions from times to times, even if you don't directly see the source code.

Or maybe C is being replaced by some other language that I'm not seeing.


C was supposed to be replaced by C++ a long time ago, but a lot of systems programmers, particularly in open source, have reverted back to vanilla C because C++ is too complicated or provides abstractions that are not needed for the problem. But on the Windows platform C++ has mostly replaced C, and on the Mac / OSX platform Objective-C has basically replaced C.

There are a few other newer systems programming languages like D, Go, and Nim, but these all have garbage collection and so are unsuitable for many of the use cases for C/C++. I understand D and Nim allow you to turn GC off, but then you also lose memory safety so it's equivalent to using C++ from that perspective.

I believe Rust is the most promising new systems programming language because its compiler enforces memory safety without garbage collection. But it's just recently hit 1.0 so it may be a while before it becomes very widely adopted.


    But it's just recently hit 1.0
As an alpha only. It's still much too unstable to be able to do anything serious with it.


> As an alpha only. It's still much too unstable to be able to do anything serious with it.

No, it's powerful today. I'm writing 'serious' code with it. Just don't write production code with it because your code will have to do a LOT of maintenance to keep up with HEAD.


marrs is correct, about the label: we call the current Rust release 1.0.0-alpha2. 1.0.0-beta will be coming out soon and the true 1.0.0 after that.

http://blog.rust-lang.org/2015/02/13/Final-1.0-timeline.html


Perhaps I should have been clearer: don't do anything serious with it if you have a deadline to meet.


Yehuda Katz uses it for production code for skylight.io, he's also a core Rust contributor though.


Yehuda was invited to be a core team member because of his use of Rust in skylight.io, not the other way around. At this point, anyone who's seriously using Rust as a fundamental component of their company is probably eligible for core team membership. :P


C was compared to Voldemort, and Harry to Python. If I am recalling my Harry Potter correctly:

Upon revealing that Harry would receive a wand that was a counterpart to Voldemort's: "...I think we must expect great things from you, Mr Potter. After all, He Who Must Not Be Named did great things – terrible, yes, but great."


C isn't dead. However, it serves two niche roles—glue code and super portable system code. It's dead in the sense that it's not growing—the unique use cases of it are forever shrinking.


It is also useful for rewriting routines in the critical path for slower, but more productive languages. Particularly languages that need to do a lot of heavy-duty data crunching (think Python, R, Matlab, Octave).

I mean, I guess you could do that in C++ instead. But why would you bother if C is good enough (and it typically is for most numerical algorithms).


By glue code you mean things like most common Foreign Interface semantics ?


Not just that, but also plugin and embedded APIs are typically C-oriented.


I understand what you're saying, but I wouldn't say it's all that surprising that people think that way. Annoying, but not surprising. People also think the mobile web will kill desktops and laptops and that there is no use for native applications.


This is definitely one of the better examples of these such lists. Usually, they're just two unrelated, ordered lists, individually ranked by the author's personal liking of the things, then zippered together with no attempt to make any sense out of the whole. But this one not only makes some sense, it's even internally consistent!


They had me at Java being Umbridge.


I also loved that her lines were in pink. ;)


Of course Harry Potter would be Python - He's a parselmouth!


Heh, I always thought Harry Potter was a bit slow.

All hail You Know Who!

(Just kidding I love Python as well, I wish I could have the best of both worlds)


Nim?


I have been toying with the idea of changing the title on my business cards from "Computational Daemonologist" to "Parseltongue" since I do most of my work in Python lately.


Came for the PHP bashing, was not disappointed.

continues quietly making money with the language


Well, yes, a lot of people make tons of money, doing terrible things.


By your comment, you seem to believe that coding in a specific language is "a terrible thing". Would you care to explain why, or are you just trolling?

(A link to another PHP bashing session is not sufficient.)


> But Fortran is… uh… getting on in years, I suppose is the polite way to put it. I mean, there are plenty who will tell you it’s still capable of some amazing stuff… but then, what language isn’t?

Whoa, whoa. Who else is as powerful as Dumbledore, except arguably Voldemort (and possibly Harry when he's older)? It is not clear at all that Voldemort's more powerful than Dumbledore either -- their fight at the end of the Order of the Phoenix was very even. Dumbledore is the only wizard Voldemort was ever afraid of, and for good reason.

Let us consider Lisp. Lisp is powerful, elegant, relevant, and respected. Despite getting on in years, few can match Lisp's power. Lisp is kind and benevolent: to other languages Lisp has given conditionals, functions, and garbage collection. I say, Lisp is Dumbledore.


A case could be made for Lisp being Ollivander. He's not the main player, but being THE wand maker to get your wand from, he's shaped the magic coming from every wizard or witch for a half century.


Erlang = Owls (message passing)


Can Wolfram Language be Gilderoy Lockhart?


Looked at article just to confirm that Perl would be Ron Weasley. Yep. This is why he's my favorite character.


I disagreed with this one. Ron is useless. It's the Weasley twins who are frustrating and absurd jokesters, yet surprisingly powerful.


Maybe Go can be Ron? Can we panic("now")?


What about Lisps? Also, it would be interesting to read about comparisons between programming languages and naturals ones. What's the most elegant natural language in the world that could be said to be the Scheme of natural languages?


I was surprised that Common Lisp was not Voldemort. You need something powerful, strange, obsessed with a sort of purity even though it's not so pure itself, and whose name no one dares speak. I guess the C/C++ Voldemort/Snape thing was cool though.


For me, Common Lisp will always be Howl's Moving Castle.

http://steve-yegge.blogspot.com/2008/11/ejacs-javascript-int...


Common Lisp: maybe an Animagus, like Sirius Black. Or maybe Alastor Maugrey (Mad Eye), who is quite powerful but is not necessarly attractive.


I'd definitely make Lisp Mad-Eye Moody, terse, and complex, but quite powerful.


I like the Sirius Black comparison. Was influential during the previous generation's rise to power but broken promises (A.I. Winter) forced him to scrape by in the background for a while. Nowadays people who know him realize his power, but to most people he is a shady character from the past.


Classical Chinese.


I checked out Mandarin the other day. Just a little syntax. From what little I saw, the syntax does seem to be more elegant than that of Western ones(the ones I know), but it still is a far cry from Scheme level elegance :)


Salamanca Spanish. Of course, there are 30 dialects of Spanish, many of which are incomprehensible, just like lisp.


I'm sorry, C is Voldemort? Buddy, you don't know from evil.


what, Ruby is not in the list? Is Harry Potter popular enough?


I mean, you gotta do Python == Harry Potter for the Parselmouth joke.

Ruby is a language which eschews strict rules in order to be more chummy and get more done, but has a dark side (with monkey-patching and less discipline than Python). Ruby is clearly Sirius Black.


tldr: languages the author likes are good, languages the author doesn't like are bad.


So which is Snape? Seems bad, turns out to be the goodest.


Only in the latest publications.


Lisp is Sirius.


How can you consider Python as Harry Potter? Maybe because they are both slow as hell in actually doing stuff.


That was marvelous. Makes me want to try learning Haskell again.


What about C#? :)


Hmm. Must go with Umbridge? Maybe the guy that David Tennant played that impersonated Mad Eye Moody?


Barty Crouch Jr.


Haskell as Hermione is gold, Jerry, gold!


aka "What your world looks like when all you know is blub".


At least the author heard of Haskell!


I want to DO haskell!


Get a monad, you two


This week in "How are we going to hate on PHP today"


AppleScript should have been Luna Lovegood and C should have been Dumbledore, I guess forth would have been so Harry Potter. :)

Allegories are interesting and funny.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: