On Wed, Jun 10, 2015 at 8:59 AM, Jeff Morrison <[email protected]> wrote:
> > Instead, the purpose of initializers outside of the constructor are to > increase expressivity in a different sense than what I think you meant > about constructor initialization: It allows initialization that isn't based > on logic in the constructor to be visually and clearly separate from logic > that is. > So let's put a visually distinct syntax *in* the constructor. The constructor is no longer as-if a function in several ways already. In for a penny, in for a pound. > It is strictly less expressive for constructor-injected state patterns, > In case I was not clear, I am not for using the current assignment-in-constructor to pun initializing in constructor, the way Java does. Initialization and assignment should be distinct. Const private instance fields must be initialized but must not be assigned to. > but it is strictly more expressive for other patterns of initialization. > What do you have in mind? > > I'm wary of adding syntax whose primary motivation is to express type > constraints, when we haven't even defined (or proposed) what typing in JS > means. > > > > _______________________________________________ > es-discuss mailing > [email protected]https://mail.mozilla.org/listinfo/es-discuss > > > > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss > > -- Text by me above is hereby placed in the public domain Cheers, --MarkM
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

