Gabriel Sechan wrote: > ---------------------------------------- > >> Date: Mon, 7 Jan 2008 01:16:23 -0800 >> From: [EMAIL PROTECTED] >> To: kplug-lpsg@kernel-panic.org >> Subject: Re: Introducing Cobra >> >> Gabriel Sechan wrote: >> >>> ---------------------------------------- >>> >>> >>> I could not possibly disagree more. The most important part of an >>> algorithm is what data it uses. And the *MOST* important feature of a >>> variable is its type. >>> >> Well, the latter is only true in language where variables *have* types, >> which some would argue is where the mistake lies. ;-) >> > In the languages without types? I agree :) > No. In the statically typed languages. > Seriously, though. A variable *always* has a type, wether the language does > or not. The type of a variable is the kind of data it holds. This is > separate from its languae type. For example, lets say we have to store > today's temperature. Its type is temperature in degree's celsius. Its > language type may be scalar in perl, int in C++, etc. But its true type is > still temperature in degrees celsius. Having a language that supports > typedefs and declarations merely documents that for you, rather than forcing > you to read the code to figure it out. > > You can't get rid of types, they're inherent in the universe- all data has a > type. All you can do is not tell me wht it is. > I'm not talking about getting rid of types. I'm talking about languages where the *variables* don't have types, which is a pretty common trait of dynamically typed languages.
With a dynamically typed language, you tend not to focus on the types of your variables, but rather their roles (there is a difference), and of course the role can and should be adequately described by the variable name. Interestingly, knowing the roles involved in an algorithm is even more telling than the data types. --Chris -- KPLUG-LPSG@kernel-panic.org http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg