-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
Redo struct signatures #83
Conversation
Here's some code that uses it:
|
Tests and documentation forthcoming, once there is agreement on the design. |
I don’t quite understand this part: "I would really like:
The first one is something you can re-enable. It used to work, right? The second one would mean a major change to the syntax of structs, even if we make these field specs optional. Students could stumble into this notation and get rather confusing error messages. |
@mfelleisen I believe it's always been the case that they were only available in ASL, at your request. But indeed, they would be easy to turn on in all the *SL. As to inline struct signatures: I agree with your assessment. We introduced this in SdP, but that has new language levels and a new keyword. Maybe that's the way to do it? |
(I thought I had turned them off.)
Let’s turn them on for 7.7.
|
What's the status here? |
No news …
|
@samth Adding tests for that is next on my list, then it should be ready to merge. |
9351a59
to
1cff04b
Compare
Tests are there now. |
1cff04b
to
1d807b7
Compare
Documentation is there. @samth @mfelleisen Could you take a look and let me know what's missing? |
This is from a discussion Matthias Felleisen and I had at ICFP 2019: The previous version of the signature support had as the name of the signature the name of the struct, which made for confusing error messages. Now, camelcase the struct name: dillo -> Dillo, foo-bar -> FooBar. This is in line with HtDP's conventions, I think. Also, primitive signatures start with an upper-case letter. The signature constructors append an "Of": DilloOf, FooBarOf etc.
1d807b7
to
f82b5c8
Compare
This is from a discussion Matthias Felleisen and I had at ICFP 2019:
The previous version of the signature support had as the name of the
signature the name of the struct, which made for confusing error
messages.
Now, camelcase the struct name: dillo -> Dillo, foo-bar -> FooBar.
This is in line with HtDP's conventions, I think. Also, primitive
signatures start with an upper-case letter.
The signature constructors append an "Of": DilloOf, FooBarOf etc.