You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Obviously we need to choose a different syntax than # to denote “private.” Maybe whoever wants to work on that can start a new issue with a proposal? And a PR can follow.
I create a new issue with a proposal:
coffeescript ~name is like javascript #name
private: @~name @.~name this.~name
public: @name @.name this.name
Wherever we can write obj.~prop we can write obj~prop, its both compile to obj.#prop
@GeoffreyBooth sayd: #4552 (comment)
I create a new issue with a proposal:
coffeescript
~name
is like javascript#name
private:
@~name
@.~name
this.~name
public:
@name
@.name
this.name
Wherever we can write
obj.~prop
we can writeobj~prop
, its both compile toobj.#prop
Example:
CoffeeScript:
Must compile to:
Private methods:
must compile to:
Access to another object:
Destructuring params to private vars:
Ugly but not the CoffeeScript 3.0
The text was updated successfully, but these errors were encountered: