Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004384OCaml~DO NOT USE (was: OCaml general)public2007-09-10 19:052016-12-08 17:28
Assigned To 
PlatformOSOS Version
Product Version3.10+dev 
Target VersionFixed in Version 
Summary0004384: RFE: nested labels syntax for { ... with ... }
DescriptionIn 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.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
xleroy (administrator)
2007-11-10 14:04

This feature could be nice indeed but seems non-trivial to implement. I'll leave it as a feature wish.
shinwell (developer)
2016-12-08 14:20

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?
octachron (developer)
2016-12-08 17:21

This feature request corresponds exactly to GPR: [^] 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.
shinwell (developer)
2016-12-08 17:27

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.

- Issue History
Date Modified Username Field Change
2007-09-10 19:05 nogin New Issue
2007-11-06 15:17 doligez Category Caml-light => OCaml general
2007-11-10 14:04 xleroy Note Added: 0004264
2007-11-10 14:04 xleroy Status new => acknowledged
2016-12-08 14:20 shinwell Note Added: 0016881
2016-12-08 17:21 octachron Note Added: 0016920
2016-12-08 17:27 shinwell Note Added: 0016921
2016-12-08 17:28 shinwell Status acknowledged => closed
2016-12-08 17:28 shinwell Resolution open => duplicate
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker