Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006037OCamlOCaml generalpublic2013-06-09 01:092013-06-09 20:55
Reporterhongboz 
Assigned Tofrisch 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionwon't fix 
PlatformOSOS Version
Product Version4.01.0+dev 
Target VersionFixed in Version 
Summary0006037: a backward-compatible way of adding new syntactic construct
DescriptionI found that the trunk changed Pexp_open
----- old
 Pexp_open of Longident.t loc * expression
----- new
 Pexp_open of override_flag * Longident.t loc * expression
-----

How about adding a new constructor instead
Pexp_open_bang of Longident.t loc * expression
The main benefit is to avoid unnecessary breaking other compiler dependent tools?

Thanks
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0009449)
frisch (developer)
2013-06-09 20:55

If we had followed this approach to make the Parsetree backward-compatible for previous evolutions of the Parsetree, we would have ended up already with a mess (many duplicated constructors, for no good conceptual reason). Not even mentioning the recent changes introduced with the "bin-annot" branch (which changes most constructors) and the forthcoming "extension_points" (idem). Tools which use directly the Parsetree or other internal modules of the compiler should be prepared for such changes.

For the specific case you cite, I see it as a good thing that tools matching on the Parsetree need to be adapted explicitly. The author of these tools need to decide whether the new form should also be recognized or not where previously the Pexp_open constructor was used. And adapting the code is rather trivial anyway.

- Issue History
Date Modified Username Field Change
2013-06-09 01:09 hongboz New Issue
2013-06-09 20:55 frisch Note Added: 0009449
2013-06-09 20:55 frisch Status new => resolved
2013-06-09 20:55 frisch Resolution open => won't fix
2013-06-09 20:55 frisch Assigned To => frisch


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker