Skip to content

Comment on Haskell for Beginners

Comments

This got me thinking of something a bit ridiculous: could it be possible, given enough carefully designed examples, to effectively teach the basics of a language without using a single word of a human language?

That's how many puzzle games work, so I'm pretty sure this can be done with programming languages just as well. It would need a good progression of examples/exercises, but I think that could even be better in some aspects. For one it enforces a certain quality for the code examples because they can't rely on any explanation. And it would be less ambiguous when covering more abstract concepts (my biggest difficulties in understanding OOP and interfaces for the first time were caused by misleading explanations).

I would say "No", because there's far more to programming than syntax.

Eg, how do you explain things like scope, object lifetimes, and destruction without words? In C for instance, there are various non-intuitive things such as that the string "Hello" is actually 6 bytes.

IMO, syntax is the least important part of programming. It's far more important to understand what exactly that syntax does. Take for instance #include. It looks straightforward on the surface, but there are lots of un-intuitive parts to it, such as that you're effectively copy/pasting a file into your code, that you need include guards, that order can make and a.h can #define something that breaks b.h, that you need to #define _GNU_SOURCE to get some particular bit of functionality before a particular header...

You can definitely write sample code to illustrate all that but I can't think of any way of explaining "what's going on" and "why we're doing this magical looking bit here" without using words.

Something like http://elixirkoans.io is most of the way there; you'd just have to remove the text description that goes with each koan.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.