-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Smalltalk-like cascading #72
Comments
Things to consider:
|
I think the syntax might be sth similar to
function __chain(me, func) {
return function() {
func.apply(this/*or `me` thinking about whether chained method must be bound?*/, arguments);
return me
}
} |
Related discussion ongoing at: jashkenas/coffeescript#1495 |
"Expression Block" is unambiguous on top-level. Making this a
|
looks cool, but not really clear |
Instead introducing another symbol for simple substitution for the cascade target would give:
↓ var x$, y$;
x$ = document.querySelector('#eyecatch');
y$ = x$.style;
y$.color = 'red';
y$.fontSize = 'large';
x$.scrollIntoView(); |
Not that this should make a difference, but remember LiveScript are using |
So what?
Colon makes most sense for labels.
Probably more relevant as named destructuring/ |
I'd like to suggest smalltalk-like cascading which I already suggested for CoffeeScript: jashkenas/coffeescript#1431 (comment)
The text was updated successfully, but these errors were encountered: