On 2009-06-30, at 14:06EDT, Brendan Eich wrote:

These are nice generic functions. With type annotations or guards, you could imagine them as adding to generic function "+":

 generic function "+"(a :Point, b :Point) {
   return new Point(a.x + b.x, a.y + b.y);
 }

Syntax is not the point, please hold fire and spare the bikeshed -- the unencapsulated (no |this| or |self|) nature of these functions is what I'm stressing.

+∞ again

If the reason is to assign responsibility to the different constructors [*]

I don't understand the "assign responsibility" argument. Is this about aligning (conflating?) security/access-control with classes/ instances?

Isn't a generic function a class that you could assign responsibility to?

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to