Its more than 20 years ago that I wrote C in Edu and SE[1] I had mostly forgotten about it until I saw Mahesh's review. So thanks Mahesh for your kind words. The trouble is I dont exactly agree with myself from 22 years ago ;-) You see even in 1991 what I was saying was that C is a stupid language to teach programming with – education – unlike say C++ which is a stupid language – period.
Lisp was conceived in 1958 and already implemented by the early 60s. One of its strange features was something called 'garbage-collection' … which took 35 years to enter the mainstream in Java.
Which is to say that for 35 years:
CS researchers did whatever they were doing for their tenure, (sorry) publications
Programming teachers righteously beat their students on their knuckles for getting pointer-errors/core-dumps/segfaults etc…
All the competing programming paradigms have serious philosophical problems.
FP probably less than the others but it too has its little share, which I deal with here.
Equality
Haskell programs look beautiful. You just write equations and everything magically just works. What could be a prettier dance between declaration (equations) and imperation (works)?
However the equations of Haskell hide a fundamental problem – equality is undecidable in general. Lets look at this from different angles:
From the time – probably millenia
ago – when humans first learnt to think ahead of their animal
neighbours, we've been able to make certain statements that
(presumably) animals can never conceive – abstract generalities.
So for example, a baby calf can recognize its mother cow with a greater unerring precision than a human baby's, yet when the human baby grows up, it can make distinctions out of the reach of our bovine brethren: eg
my mother vs motherhood
motherhood vs love
cheap love poetry vs hi-class love poetry
etc
In short, humans are very comfortable
dealing with abstractions as though they were concrete.
Now I have a conjecture, viz. that grand generalities have some
hormonal trigger for making us feel elated (a
grande-generality-pheromone maybe?) so that statements like
Nothing in the universe can go faster than the speed of
light
Every pair of bodies in the universe attract each other according to a trivial-to-state mathematical law irrespective of their distance or relative size
Anything that can be computed by any computer whatever
(invented or yet to be invented) can be computed by a Turing
machine
create a certain tickling feel-good that a 'normal'
(non-general) statement like say: My tea has less sugar
does not produce.
In my earlier posts Ive discussed some context around why OO has been one of the more dismal failures in the history of IT/CS. Here I talk of the error in thinking 'inheritance'. And this gives the philosophical separation between those drawn to OOP and those not.
Before I come to the meat of the matter – why OO sucks – it would be good in all fairness, to deal with the
When I was younger, I believed that OO was THE (or at least one important) solution to programming problems. Over years Ive come to see that OO works in some cases and fails badly in many others. So I intend to blog on and off about my reservations with OO. I'll start off with touching on…
I am often surprised that people think of recursion in the narrow context of recursive functions, missing the widespread and ubiquitous status of recursion in computer science. If I may be permitted some jargon, we need to move on from recursion in recursive functions to the
To grow a chip on a grain of silicon
And see god in a programmer
Store infinity in recursing automaton
And decidability in a compiler
A source-tree filled with cases by the horde
Shudders hell through the Intel board
A programmer unslept, working late
Predicts the ruin of machine state