News for hackers. Stuff that matters.
Re:Ask HN: Why choose a dynamically typed language? by gaius on Saturday August 07, 2010 @01:11PM (#1583855)
As of right now, Python, Perl, Ruby and Tcl have larger and more relevant to everyday work libraries, documentation, sample code, etc, than Haskell, Ocaml et al.

This is changing. We'll see Haskell and Ocaml in the early 2010s, where Python and Ruby where in the early 00s. Still a little off the beaten track (as per the Python Paradox) but definitely usable. And if you're deploying compiled code, you don't even need any runtime on your target...

Re:Ask HN: Why choose a dynamically typed language? by spooneybarger on Saturday August 07, 2010 @01:19PM (#1583872)
So your answer to why you choose dynamic languages has nothing to do with the type system? IE, the question isn't revalent to you?

Question, what does compiled code have to do with dynamic vs static typing? You can compile dynamic code, you can interpret static code. The typing system or lack thereof, has nothing to do with compilation.

Re:Ask HN: Why choose a dynamically typed language? by gaius on Saturday August 07, 2010 @01:36PM (#1583902)
No I love type inference.

I remember those days when Python was yet to be accepted as a mainstream language. I wanted to use it, but I was writing software for our clients, who would deploy my code on 10,000 Unix boxes. This is back when an estate like that was a huge and unwieldy thing to manage. There was simply no way that our customers were going to roll out and commit to maintaining a whole new runtime across their estate just for me (where "me" is "my project"). So our realistic choices were Perl or compiled code. Nowadays Python has become a "normal" language and no-one bats an eyelid when I list it as a prereq. Took, all told, maybe 7-8 years from when I first thought "Python can give me a serious productivity boost relative to C" to that point.

I have used Ocaml "for real" and I am still getting up to speed on Haskell (I love it!), but this time, I can skip all the struggle for acceptance. I can just ship 'em a binary. Is the type system going to give me as big a boost in real productivity (incl. debugging and support overheads) as Python did over C? Well we shall see...

Re:Ask HN: Why choose a dynamically typed language? by spooneybarger on Saturday August 07, 2010 @02:37PM (#1584027)
I still dont see how much of this has anything to do with dynamic vs. static. You seem to primarily be addressing off topic points which have nothing to do with why do you choose dynamic over static.
Re:Ask HN: Why choose a dynamically typed language? by gaius on Saturday August 07, 2010 @02:55PM (#1584059)
Your question was:

What are your reasons for choosing a dynamic language?

And my answer was, to get a productivity boost over C. At the time, there was no strongly-typed language that it was feasible to use that offered as much leverage. Now there is, and one of the reasons for that is the new crop of functional type-inferred languages that "play nicely" with existing estates by deploying as compiled code (native, or .NET, or JVM).

Very few people have the luxury of coding in a vacuum. Language choice is very rarely a purely technical one.

Re:Ask HN: Why choose a dynamically typed language? by spooneybarger on Saturday August 07, 2010 @05:01PM (#1584305)
It wasn't my question. My question could be boiled down to... so as you spent most of your time talking about things that have nothing to do with dynamic vs. static, i take it that they aren't really relevant to you. You said no. But you answer still seems to have little do with static vs dynamic but about more concrete comparisons that seem to be, at best, orthogonal to the question at hand.
Re:Ask HN: Why choose a dynamically typed language? by gaius on Sunday August 08, 2010 @04:37AM (#1585070)
Ermm, it was, it's right there on the page! I answered in great depth, explaining that "dynamic vs static" (again your words) is in fact a question with many variables.

Perhaps you meant to ask about "weakly vs strongly" typed?

Re:Ask HN: Why choose a dynamically typed language? by kragen on Saturday August 07, 2010 @02:25PM (#1584008)
What do you think about the libraries, documentation, and sample code available for Scala or F#? I think they might have a better chance than Haskell or OCaml, no?
Re:Ask HN: Why choose a dynamically typed language? by gaius on Saturday August 07, 2010 @03:02PM (#1584077)
I'm excited by the possibility that these languages will make functional programming mainstream. Clojure's another exciting language. But I had to choose, there're only so many hours in the day, and for better or worse, Haskell is where I am focussing my efforts.