Re:The Applied Theory of writing bug-free code
by silentOpen on Saturday October 10, 2009 @10:16PM
(#874208)
Have you written in anything from the ML family? I strongly recommend you take a look at OCaml or Haskell. I believe you will find that static typing, when done right, is immensely helpful.
Re:The Applied Theory of writing bug-free code
by scotty79 on Sunday October 11, 2009 @07:23PM
(#875516)
I'm using language without static typing for most of my work and I can hardly remember any bug that was caused by having wrong type of data in unexpected place. I remember very well redundancy of using language with static typing, I know how much boilerplate code is needed in languages such as java, and how complicated can generics become in C# if you want to achieve fairly simple architectural things that can be concisely expressed in dynamically typed languages.
Re:The Applied Theory of writing bug-free code
by silentOpen on Monday October 12, 2009 @04:39AM
(#876307)
Ok. Those languages do static typing incorrectly. Try a language that sports type inference. It isn't redundant. There isn't boilerplate. The type system is far more powerful than in Java or C# (polymorphic types, polymorphic variant types, algebraic types and constructors, functors, etc).
You owe it to yourself to learn these systems. In many cases, there are type-side symptoms of logic-side bugs. If Haskell's laziness and purity scare you, try OCaml -- it's fast and straightforward.
Re:The Applied Theory of writing bug-free code
by tetha on Sunday October 11, 2009 @07:16PM
(#875503)
You are right, even though you have to give him the point that a lot of the existing static type systems around by now are bad. Haskell is approachig a really nice, hassle-free type-system, but take, e.g., Javas typesystem? Bleh.
It's a hard solution (vide generics and all the redundant typing) for minor problem and it cannot justify its existence on such basis.
For me static typing is just a hack on the side of compiler guys to make their work easier for them. It was claimed to have benefits for programmers at later date.