wren romano (
winterkoninkje) wrote2010-07-28 12:32 am
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Entry tags:
If you were hacking since age 8, it means you were privileged.
All you hackers should read this. True to form, I came to hacking late, much despite a strong interest in mathematics as a child. (For those who may not be aware, mathematics does not have the same gender inequity problems CS does.) These sorts of privilege contests have always pissed me off, not just because of the machismo involved but also —though I did not have the words at the time— exactly because of their brandishing of white male privilege as virtuous and ideal.
no subject
no subject
I bring up beginning with Perl more often because I think that's actually relevant. I started from Perl and have been working my way down towards the CPU (and pure theory) ever since. I think starting with a high-level language like Perl is best, because it encourages you to think with high-level abstractions instead of getting hung up on low-level implementation details. All the folks in my undergrad classes who started with C (or C++ or Java) had a much harder time grasping the algorithms at stake because they couldn't see the forest for the trees. If I were designing intro curricula, I'd be torn between teaching Perl vs teaching Haskell. The pure/strong-typing and lambda-calculus of Haskell are really important to learn early, but Haskell tends to have a lot of low-level datastructures which can distract from the basics. Perl is great for writing how you think and ignoring low-level details and paradigms, but it's also an untyped nightmare. C et al. are the worst of both worlds (low-level and no types worth mentioning), whereas untyped functional languages like Erlang and Scheme lay somewhere in between (lambda calculi, but still no types).
no subject
no subject
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.