Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

The illusion of static typing

Name: Anonymous 2009-09-08 9:28

You know, /prog/, I can't tell you how much disdain I have for static languages. Don't get me wrong, I don't hate them, because they really conjure very little emotion in me at all... I just don't see how they're ever useful in any possible way, and I'm constantly baffled by people who act like they're the second coming. It's like if you painted spoiler tags on the back of your car so it will go faster. In fact, not only is it pointless, it's counterproductive, because it takes away from the real power that's available to you if you know where to look.

I was talking to a Haskell programmer yesterday. (You know the type: Thinks way too much about everything, always has this lost look in his eyes, talks strictly in terms of category theory whenever he realizes he's losing an argument... Never written a macro in his life. Basically, he's going for a gold medal in the virgin olympics.) And, you know, it really struck me how desperately he was clinging to the fairy tale of the necessity of type declarations. I tried to explain to him how he was completely going against the spirit of Knuth's Law (premature optimization) but he was totally blind to it, almost like a Holocaust denier. He just didn't understand that all static languages are fundamentally prohibited from even being mentioned in the same breath as a real high-level language.

And then when I tried to coerce him with concepts like interactive development, he said (get this) "Haskell is all about interactive development." He actually said that. No joke. At first I almost laughed, and then I realized how sad it is that every time he changes a function definition, he has to sit and wait a few minutes for his compiler to make sense of this toy language's devilish semantics. And then I almost cried, /prog/, I almost wept for him, right there. I could no longer bear to tell him that Haskell is just another static language. If I'd said another word his tiny mind might have broken, and rather than make up stupid words from category theory to pad his academic resume, he might have jumped off a bridge. He must have known in his heart that Haskell was a toy, and I was systematically destroying the illusion. If only academics weren't so sensitive...

But I digress. I think the real problem is that the entire current crop of programmers has mostly been ruined by static typing. It forces them into boxes and poisons their tiny minds, when they'd have the whole world to see if only they abandoned these artificial constraints. Even scripting languages that tout themselves as "dynamic" are really backdoor OO type systems with a nice friendly clown face painted over the devouring static jaws. At times I think there's no hope for computer science.

Then again, there was a tiny glimmer yesterday. As I continued on my afternoon stroll, an acquaintance approached me (a non-programmer) and informed me he was interested in Lisp. I smiled and showed him how to install Emacs, SLIME, and naturally SBCL. He's already well on his way to joining the ranks of good programmers. I'm thankful I had the opportunity to save one person from total disaster, even if another is probably lost forever. So rejoice with me, /prog/, and let's nest some parens.

Name: Anonymous 2009-09-08 10:08

>>1
I'm glad I learned CL myself, and I do use Emacs+SLIME+SBCL myself, but I don't think static languages are all that useless. They're fine if you have a complete idea of every little detail and type of your program, but most humans can't think that far into the future.
Maybe E.N. said it better here: http://groups.google.com/group/comp.lang.lisp/msg/917737b7cc8510e3
A lot of the times we don't have a complete idea of the full solution to the problem we want to solve, in which case you have to do a lot of guesswork, and maybe guess wrong and then correct yourself.
Implementing something which has a very clear spec is also something which is usually fine to do in static languages.
The major reasons I can think of why you would use static languages are:
1)Correctness
2)Speed
but these come at a great cost of flexibility and time.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List