---------------------------------------- > Date: Mon, 7 Jan 2008 01:30:58 -0800 > From: [EMAIL PROTECTED] > To: [email protected] > Subject: Re: Introducing Cobra > > 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 never argued you can't. I was arguing that variable declarations, to me, are more important and useful than any of those features some people rave about.
> 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 foo = new MyDictionary(); > I can see this argument. Not sure I agree, but I can see it. I'd argue you're dropping the wrong one though- the declarator is useful, and provides additionall functionality (refering to an oject by a base class reference/pointer). Its the one to the right of the new which may be redundant. If you were to drop one, thats the one to drop. Gabe _________________________________________________________________ Get the power of Windows + Web with the new Windows Live. http://www.windowslive.com?ocid=TXT_TAGHM_Wave2_powerofwindows_012008 -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg
