Skip to content
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

With-pipe #121

Closed
apaleslimghost opened this issue Jul 25, 2012 · 1 comment
Closed

With-pipe #121

apaleslimghost opened this issue Jul 25, 2012 · 1 comment

Comments

@apaleslimghost
Copy link
Contributor

Inspired by satyr/coco#72, what do you guys think to:

document.query-selector '#eyecatch'
  @>style
    @>color    = \red
    @>font-size = \large
  @>scroll-into-view!

compiling to

var x$, y$;
x$ = document.querySelector('#eyecatch');
y$ = x$.style;
y$.color = 'red';
y$.fontSize = 'large';
x$.scrollIntoView();

I chose this syntax because @satyr's proposal, & is our arguments shorthand, and this usage feels similar to |>.

@paulmillr
Copy link
Contributor

as before, I don't really like the idea of cascades (more shared state management), but I guess it's because I didn't tried them. also, @> is a bad symbol, it's better to use dart / smalltalk ..

document.query-selector '#eyecatch'
  ..style
    ..color    = \red
    ..font-size = \large
  ..scroll-into-view!

@gkz gkz closed this as completed in 1aa4ea5 Jul 27, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants