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:
Anonymous2009-09-08 9:33
Hell, make him learn Smalltalk/ObjC for the heck of it.
(I use PLT, boo hoo)
Name:
Anonymous2009-09-08 9:40
I can't tell you how much disdain I have for static languages they really conjure very little emotion in me at all...
>>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.
Name:
Anonymous2009-09-08 10:17
>>8
Agreed, once you know every detail of your program (which the compiler should do for you) you can translate it to a static language (which the compiler should do for you) that can immediately be run in your live image (so, the only useful static language is assembler).
>>13
Some coders work for the computer, see: C programmers.
This isn't necessarily a bad thing as given a lot of time and effort, the project will work reasonably well, maybe with some minor bugs and be very fast, it's just that not all programmers have that much time on their hands, unless they're payed to such a task.
>>12
More importantly, static typing makes it easier for ME to make certain assumptions about the data. Additionally, the compiler can verify these assumptions for me.
Name:
Anonymous2009-09-08 12:16
>>16
Static typing is not a substitute for contracts.
Name:
Anonymous2009-09-08 12:27
>>17
It's not a substitute, it is a part of it. And any part that the compiler can verify is a Good Thing (tm) in my book.
Name:
Anonymous2009-09-08 12:32
You know, one of the reasons why SBCL is so fast is because it uses type inference to turn those dinamically typed functions into statically typed ones.
Name:
Anonymous2009-09-08 12:37
>>18 It's not a substitute, it is a part of it.
Not really.
>>19
Of course, or you could use type declarations when you need more speed. I think the point OP is trying to make is that static typing by default can be an unneeded burden on the programmer, and is only needed in latter stages of development when the design is already pretty clear and you're just hunting for speed.
Name:
Anonymous2009-09-08 13:06
OP is full of shit!
Name:
Anonymous2009-09-08 13:07
>>21
Static typing isn't much of a burden once you have type inference and a decent type system like Haskell's. It really does more often help than get in the way, actually. On the other hand, I do think Haskell's compiling times are in fact a hinderance to interactive development. But, on the original hand, a smalltalk-like environment, where you only compile one method/function at a time (instead of the whole module) and where the compiler could be doing the type inference/checking incrementally as you edit the damn function, then compiling times wouldn't matter at all.
Name:
Anonymous2009-09-08 14:19
But, on the original hand, a smalltalk-like environment, where you only compile one method/function at a time (instead of the whole module) and where the compiler could be doing the type inference/checking incrementally as you edit the damn function, then compiling times wouldn't matter at all.
something like factor?
>>12
This kind of reasoning is what makes Haskell one of the worst examples of the tradeoff between complexity in the compiler and complexity that the programmer has to deal with.
>>21
That's the sort of thing you're supposed to define during the design phase, not the coding phase. Coding is fucking easy when the specs are clear.
>>38
If you have a crystal clear spec and your problems have no hint of uncertainty in them, then by all means use a static language, you likely won't have any benefits.
Excuse us, the less-than-godlevel programmers that use explorative programming.
hELLO I AM >>46'S GIRLFRIEND AND TODAY HE WOKE ME UP SUDDENLY WHEN HE BURSTED INTO LAUGHS READING A STUPID INTERNET JOKE. i WAS FUCKING ANNOYED BECAUSE HE DIDN'T FUCK ME WELL, SO I WAS HOPING FOR A GOOD SLEEP. aT LEAST THE JOKE HAD TO BE GOOD, BUT THEN I FOUND OUT IT MAKES FUN OF LISP. hE NEVER SAW ME AGAIN.
KIDS, IF YOU DON'T WANT TO END UP A FAILURE LIKE >>46 DO DRUGS AND LEARN LISP.
Name:
Anonymous2009-09-23 17:46
>>47 >>12,14 may be samefag, but as >>13 I can insure you I am not either of them.