Skip to site navigation (Press enter)

Re: new

Kevin Reid Tue, 11 Oct 2011 15:46:19 -0700

On Oct 11, 2011, at 18:29, Jake Verbaten wrote:

> Point.zero = function () {
>   return (new Point).{ x: 0, y: 0 };
> }
> 
> why are factory methods special? they are just methods.

I agree with "things should be just methods", but this particular pattern 
doesn't work for always-frozen types.

-- 
Kevin Reid                                  <http://switchb.org/kpreid/>

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss
  • Previous message
  • View by thread
  • View by date
  • Next message
      • Re: new <Object> Axel Rauschmayer
        • Re: new <Object> Jake Verbaten
          • Re: new <Object> Axel Rauschmayer
            • Re: new <Object> Jake Verbaten
              • Re: new <Object> Allen Wirfs-Brock
              • Re: new <Object> Jake Verbaten
              • Re: new <Object> Axel Rauschmayer
              • Re: new <Object> Jake Verbaten
              • Re: new <Object> Axel Rauschmayer
              • Re: new <Object> Jake Verbaten
              • Re: new <Object> Kevin Reid
              • Re: new <Object> Jake Verbaten
              • Re: new <Object> Kevin Reid
              • Re: new <Object> Allen Wirfs-Brock
  • Re: new <Object> Axel Rauschmayer
    • Re: new <Object> Allen Wirfs-Brock

Reply via email to

The Mail Archive
  • The Mail Archive home
  • es-discuss - all messages
  • es-discuss - about the list
  • Expand
  • Previous message
  • Next message
es-discuss
  • The Mail Archive home
  • Add your mailing list
  • FAQ
  • Support
  • Privacy
  • [email protected]