Izador, by your logic shouldn't all static methods should be up-cased -
Math.random, String.fromCharCode, Date.now, etc? They are all unique and,
for all intents and purposes, canonical.

##
Advertising

Or to put it another way, what is the difference between "f(x) = x" and
"f(x) = x+1"... why would the former be up-cased, but not the latter?
My vote goes to lower-case. It's easier to type, and I don't see enough of
a distinction to warrant special casing.
- rwk
On Wed, Oct 21, 2009 at 7:33 AM, Izidor Jerebic <ij.l...@gmail.com> wrote:
>
> On 21.10.2009, at 14:38, joneff wrote:
>
> > Actually, from your point of view each
> > unique function (a function that returns different result for
> > different argument) should be considered constant function since there
> > is only one way to get the result.
>
> This is true. Value of a function 'f' is not its return value (there
> is none without parameter), but the code which defines its behaviour.
> You can do alert( f ) to see how javascript treats function values.
>
> >
> > To me a constant function is f(x) = x^0, since it's always equal to 1.
>
> This is a function which returns constant value (constant in space of
> floating point values). The return value is not the value of function
> in function space, the value in function space is the code which
> defines its behaviour. And in this space IDENTITY is constant - there
> is only one.
>
> alert( Funtion.IDENTITY ) shows you the value, and this value is
> constant in space of function values. This is one special function
> value - it corresponds to function which returns its parameter, and
> because of that this constant value deserves a name (unlike other
> constant function values, for which we do not have a name).
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to
prototype-core-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---