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

RFC: Make struct optional in mutable struct #22212

Closed
wants to merge 1 commit into from
Closed

Conversation

ararslan
Copy link
Member

@ararslan ararslan commented Jun 4, 2017

After using this for a while, I've decided that I find mutable struct to be quite long, and I find it odd that it doesn't match struct in being a single word. Thus this PR makes struct optional. Mutable types may now simply be defined as mutable X end rather than mutable struct X end, though the latter still works. Once upon a time, type was optional in immutable; we had immutable and immutable type. This is analogous to that.

I imagine this may be controversial, but hopefully it can at least be considered.

@ararslan ararslan added the parser Language parsing and surface syntax label Jun 4, 2017
@fredrikekre
Copy link
Member

RIP comment: #20418 (comment)

@JeffBezanson
Copy link
Sponsor Member

Sorry, but I'm 👎 here. (1) I like the presence of a noun; the basic idea of type and immutable type was good, it just used the wrong words and the wrong default :). (2) In isolation this syntax would be ok, but this requires adding a reserved word, which I don't think is worth it.

@ararslan
Copy link
Member Author

ararslan commented Jun 4, 2017

Mostly I just dislike the multiple-word definitions, so I figured having this one be optional may be a decent compromise. Granted, I don't particularly like the idea of anything being optional like this; I just miss concisely defining types.

@kmsquire
Copy link
Member

kmsquire commented Jun 5, 2017

@mutable macro?

@KristofferC
Copy link
Sponsor Member

I don't think defining structs is common enough for a super terse syntax to be needed.

@ararslan ararslan closed this Jun 5, 2017
@ararslan ararslan deleted the aa/mutable branch June 5, 2017 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parser Language parsing and surface syntax
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants