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

Reserve a word for chaining #24082

Closed
bramtayl opened this issue Oct 10, 2017 · 7 comments
Closed

Reserve a word for chaining #24082

bramtayl opened this issue Oct 10, 2017 · 7 comments

Comments

@bramtayl
Copy link
Contributor

Using a word/symbol to refer to the previous result is by far the most straightforward implementation of chaining, IMO. So I think Julia should reserve a word/symbol to refer to a chained item before 1.0 hits, even if chaining itself isn't implemented. Possibilities include it or ans.

@andyferris
Copy link
Member

I like the way that ans is the same as the REPL, but I've also suggested _ as a right-hand-value for this.

I agree this would be a simple and straightforward way to do chaining but I'd settle for ans or _ after |>.

@bramtayl
Copy link
Contributor Author

I've been convinced that _ as a right hand chained value is too confusing when it also means discard this as a l value. But it is convenient in that its already reserved

@bramtayl
Copy link
Contributor Author

I like it because pronouns are English's build in system of chaining

@andyferris
Copy link
Member

It's not a "binding", it's a "probinding" :)

@bramtayl
Copy link
Contributor Author

what does that mean?

@andyferris
Copy link
Member

Just being silly.

Noun -> pronoun
Julia variable binding -> ?

@bramtayl
Copy link
Contributor Author

Ah got it lol

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

2 participants