Suffix-based literal syntax

David B. Held dheld at codelogicconsulting.com
Wed May 30 22:18:42 PDT 2007


Reiner Pope wrote:
> Here's a small thought to improve the syntax for some user-defined 
> types: can we perhaps overload the suffix on literals, to give some user 
> types nicer literals?
> [...]

I've considered it and argued for it before, but when it comes down to 
it, how much is this going to be used?  Really, it's only going to be 
used for manifest constants, which tend to not be terribly numerous. 
Most other uses of dimensional types are as *variables*, and there the 
dimension is encoded in the type, not the suffix.  The fact that we can 
get "almost there" syntax demotivates this feature for some folks.

Dave



More information about the Digitalmars-d mailing list