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

RFE: nested labels syntax for { ... with ... } #4384

Closed
vicuna opened this issue Sep 10, 2007 · 4 comments
Closed

RFE: nested labels syntax for { ... with ... } #4384

vicuna opened this issue Sep 10, 2007 · 4 comments

Comments

@vicuna
Copy link

vicuna commented Sep 10, 2007

Original bug ID: 4384
Reporter: nogin
Status: closed (set by @mshinwell on 2016-12-08T16:28:01Z)
Resolution: duplicate
Priority: normal
Severity: feature
Version: 3.10+dev
Category: ~DO NOT USE (was: OCaml general)
Monitored by: ertai @yakobowski @alainfrisch

Bug description

In I have a nested record type and want to override a field in an interior record, I have to write something like:

{ r with field = { r.field with nested_field = expr }}

It would have been nice if a syntactic shortcut

{ r with field.nested_field = expr }

was available. I could of course always use camlp4, but it was nice if this was a part of the "official" syntax.

@vicuna
Copy link
Author

vicuna commented Nov 10, 2007

Comment author: @xavierleroy

This feature could be nice indeed but seems non-trivial to implement. I'll leave it as a feature wish.

@vicuna
Copy link
Author

vicuna commented Dec 8, 2016

Comment author: @mshinwell

There has been remarkably little enthusiasm for this change over the past nine years.

If this were implemented there would need to be some sort of check to ensure that a given field was not specified more than once in a given declaration.

@lwhite thinks there may be some other nasty case here, but cannot remember what.

Does anyone object to closing this issue?

@vicuna
Copy link
Author

vicuna commented Dec 8, 2016

Comment author: @Octachron

This feature request corresponds exactly to GPR: #291. I am not sure if it make sense to close this issue when the github pull request is still open.

If we were to close the pull request, I think it would also be worthwile to somehow track the fact that this feature is more difficult to get right that it may appear, as illustrated in the github PR.

@vicuna
Copy link
Author

vicuna commented Dec 8, 2016

Comment author: @mshinwell

Ah, there is a GPR. I think it's fine to close these in favour of the GPRs. It only serves to waste time when looking through Mantis items finding things to fix and discovering in the comments that development is already occurring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant