winterkoninkje: shadowcrane (clean) (Default)
wren romano ([personal profile] winterkoninkje) wrote 2010-08-01 10:34 pm (UTC)

C is definitely a language everyone should learn at some point. This is one of those rare times when I agree with Joel on Software: the two hard things every CS major must learn are pointers and recursion. But since pointers are evil, everyone since C doesn't give you actual pointers; instead they protect you from yourself via references of some flavor or 'nother. So if you want to learn pointers, then you have to learn C. It's a shame really. Though the typelessness of C should put you in the right mindset for really learning what CPUs are munching on, and why pointers matter.

As for Haskell, it is a very minimal language. Far more minimal than OCaml or SML/NJ, that's for sure. Let's see here: ADTs, parametric polymorphism, typeclass polymorphism, and laziness. That's about it really. There's some syntactic sugar here and there (user-definable infix operators, do-notation, list comprehensions, guard patterns), but those really are mere syntactic sugar for writing the same thing another way. The trick is, Haskell chose its primitives to be orthogonal to one another, thereby simplifying the language and also getting the most power for your buck.

But there's also the problem of being too minimal. The untyped lambda calculus is Turing complete and all, but jiggering around with it obfuscates your code away from the actual task at hand just as badly as C does. This is why I'm no fan of Scheme. Sorry, no. Not everything is a list; no more than everything is an int, C to the contrary. Besides, with the wide assortment of different macro systems, making math primops into folds, and yet distinguishing other functions as being regular functions vs fold functions, having side effects, multiple types of equality,... you can hardly call Scheme a "minimal" language in this day and age.

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org