On Mon, Jan 07, 2008 at 03:12:18AM -0600, Gabriel Sechan wrote:
Some people wax poetic about closures or recursion or functions as a first class objects. They're all fools. Variable declarations are the single biggest piece of genius in the history of programming. And thats without even getting into how many freaking bugs it finds due to compile time checking of types.
Why not have strong compile-time checking of types as well as closure, recursion and first class functions? Aside from that... I would argue that having to specify the type twice makes the code _less_ readable. The programmer will get used to the type being duplicated, and will miss the important instances where they are different. A pathetic example being: Container foo = new Conta1ner(...); But, I can think of class libraries where the parent class is similarly named, speciall in a prefix of the name. Dictionary<String,Int> foo = new MyDictionary<String,Int>(); You have to look pretty hard to see the little 'My' in the specific type. But, take Boo, or Cobra as an example: foo = new MyDictionary<String,Int>() is clear what the type of foo is. If I want a parent type: foo as Dictionary<String,Int> = new MyDictionary<String,Int>() Since it only needs to be done when they differ, it warns the programmer that something is going on here. Dave -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg
