On 21.10.2009, at 16:40, Robert Kieffer wrote:

> 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?

Ours already has a name in mathematics - identity function, and it is  
primarily used by assigning its value (like var f =  
Function.IDENTITY), not by calling it (like Function.IDENTITY(3); )

We want this value to be assigned or passed as parameter. That is the  
main purpose of the definition. Our interest in other functions is  
primarily in calling them - you rarely assign  Math.random.

So the difference is in usage - is it used more as value or more as  
function call ? If it is value, then it is treated as constant (which  
it is). If it is called, it is treated as function name.

IDENTITY is obviously never meant to be called explicitly, so it is a  
constant value meant to be passed around.


izidor


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to