You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 4648 Reporter:@mmottl Status: closed (set by @xavierleroy on 2011-06-04T07:32:17Z) Resolution: fixed Priority: normal Severity: feature Version: 3.11.0+beta Fixed in version: 3.12.0 Category: ~DO NOT USE (was: OCaml general) Monitored by: BenediktGrundmann @glondu "Julien Signoles" hirokawa @yakobowski@mmottl
Bug description
It seems to be one of the more frequent annoyances concerning OCaml syntax that record fields can only be bound/matched explicitly, e.g. in the following way:
let { Foo. some_long_name = some_long_name; b = b } = my_rec in ...
Unless I'm seriously mistaken, it should be very easy to support the following:
let { Foo. some_long_name; b } = my_rec in ...
Especially in cases where there are many record fields and long names this would substantially reduce the effort of extracting/matching records.
This feature wouldn't require any new keywords, wouldn't break existing code, looks very intuitive (AFAIK, SML supports something of that sort), and should be straightforward to implement.
Could you please consider this for inclusion in a future OCaml-release?
The text was updated successfully, but these errors were encountered:
Original bug ID: 4648
Reporter: @mmottl
Status: closed (set by @xavierleroy on 2011-06-04T07:32:17Z)
Resolution: fixed
Priority: normal
Severity: feature
Version: 3.11.0+beta
Fixed in version: 3.12.0
Category: ~DO NOT USE (was: OCaml general)
Monitored by: BenediktGrundmann @glondu "Julien Signoles" hirokawa @yakobowski @mmottl
Bug description
It seems to be one of the more frequent annoyances concerning OCaml syntax that record fields can only be bound/matched explicitly, e.g. in the following way:
let { Foo. some_long_name = some_long_name; b = b } = my_rec in ...
Unless I'm seriously mistaken, it should be very easy to support the following:
let { Foo. some_long_name; b } = my_rec in ...
Especially in cases where there are many record fields and long names this would substantially reduce the effort of extracting/matching records.
This feature wouldn't require any new keywords, wouldn't break existing code, looks very intuitive (AFAIK, SML supports something of that sort), and should be straightforward to implement.
Could you please consider this for inclusion in a future OCaml-release?
The text was updated successfully, but these errors were encountered: