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
This is a proposal that could actually be added to Successor ML implementations (SML/NJ and MLton).
I was looking the MLton codebase and noticed code like this popping up everywhere.
datatype z = datatype Control.Target.arch
datatype z = datatype Control.Target.os
datatype z = datatype Control.Format.t
datatype z = datatype Control.codegen
I had no idea what the point of creating an "alias" and immediately shadowing it would be. I had to look at several examples to realize the purpose of this: it's to make the constructors of each datatype available without qualification.
It would be much clearer if, instead of a weird idiom, this could be expressed directly as:
This is a proposal that could actually be added to Successor ML implementations (SML/NJ and MLton).
I was looking the MLton codebase and noticed code like this popping up everywhere.
I had no idea what the point of creating an "alias" and immediately shadowing it would be. I had to look at several examples to realize the purpose of this: it's to make the constructors of each datatype available without qualification.
It would be much clearer if, instead of a weird idiom, this could be expressed directly as:
Or even:
Since
datatype
is a keyword, it can't be the name of a module, so there's no ambiguity withopen
for modules.The text was updated successfully, but these errors were encountered: