News for hackers. Stuff that matters.
Re:Fizz Buzz: Enterprise Edition by recursive on Monday March 18, 2013 @02:58PM (#5396363)
Statically typed programs are longer because they contain more information.
Re:Fizz Buzz: Enterprise Edition by metaphorm on Monday March 18, 2013 @03:32PM (#5396592)
they don't contain more information. they contain more explicit declarations of that information. dynamically typed languages leave that information hidden because it is inferrable (or irrelevant).
Re:Fizz Buzz: Enterprise Edition by kyllo on Monday March 18, 2013 @05:16PM (#5397171)
>dynamically typed languages leave that information hidden because it is inferrable (or irrelevant).

So do good, high-level statically typed languages, i.e. the kind with type inference. Like Scala or ML.

Re:Fizz Buzz: Enterprise Edition by metaphorm on Monday March 18, 2013 @05:58PM (#5397440)
indeed. Scala's type inference system is truly beautiful. lets hope it catches on and becomes a widely adopted feature of the next generation of languages.
Re:Fizz Buzz: Enterprise Edition by tikhonj on Monday March 18, 2013 @07:42PM (#5397904)
If you want to see a really beautiful type inference, take a look at Hindley-Milner. Not only is it global (it infers all the types in your program) but it's also surprisinlyg simple--it's basically just a straightforward constraint satisfaction problem.

In particular, take a look at how it has been extended by real languages, especially OCaml. OCaml has some very cool sub-typing features but manages to maintain global inference, unlike Scala. (Largely by choosing structural rather than nominative sub-typing.)

So some languages have had better type inference for longer than Scala has been around.

Re:Fizz Buzz: Enterprise Edition by recursive on Monday March 18, 2013 @04:41PM (#5396989)
When the programmer is the one that has to be doing the inference you refer to, there seems to be a good argument that the speed advantage you refer to is only apparent in programs small enough to conceptualize in their entirety.