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

Update grammar.txt with func and as #14147

Merged
merged 1 commit into from
Apr 28, 2020
Merged

Update grammar.txt with func and as #14147

merged 1 commit into from
Apr 28, 2020

Conversation

metagn
Copy link
Collaborator

@metagn metagn commented Apr 28, 2020

No description provided.

@Araq Araq merged commit 82fc66b into nim-lang:devel Apr 28, 2020
@Araq
Copy link
Member

Araq commented Apr 28, 2020

Ah bah, but this is a generated file...

@metagn metagn deleted the patch-1 branch April 28, 2020 08:58
@zah
Copy link
Member

zah commented Apr 28, 2020

BTW, what's the plan for the as operator? We recently considered starting overloading it as a "explicit type conversion" operator.

@metagn
Copy link
Collaborator Author

metagn commented Apr 28, 2020

Maybe a call to another symbol like in calls contains. Something like:

template `as`(x: untyped, T: typedesc): T =
  var converted: T
  convert(x, converted)
  converted

and things like serialization/game libraries can overload it. There should be an RFC about it.

Edit: Closest RFC is nim-lang/RFCs#84, I'll make a comment there about it

@Araq
Copy link
Member

Araq commented Apr 28, 2020

I have no plans for as, it's yours to take. :-)

EchoPouet pushed a commit to EchoPouet/Nim that referenced this pull request Jun 13, 2020
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

Successfully merging this pull request may close these issues.

None yet

3 participants