Interpolation struct names and location
Steven Schveighoffer
schveiguy at gmail.com
Wed Feb 14 05:30:47 UTC 2024
[DIP 1036e](https://github.com/dlang/dmd/pull/15715) has been
merged and is going to be in the next release (set to be cut on
March 1).
Once this is upon the world, it will be very difficult to change
the names of the types used for these things. I want to make sure
everyone has a chance to think about this and suggest what they
think.
The way the lowering is set up, you do NOT have to import
`core.interpolation` to *use* them. Most of the time, you will be
only doing that in order accept the types as function parametrers.
However, [these
names](https://github.com/dlang/dmd/blob/98443676dcfa32f7234ebab6ca9f925e1d3cd736/druntime/src/core/interpolation.d#L102) are rather verbose. And every function that accepts these sequences is going to be mangled with some pretty long names.
I propose we discuss both for where these types should live and
what they should be called. I personally think we might want to
move these things to object.d (yes, I know object.d is big, but
these are not big or complex types), and rename them something
more succinct.
Something like `iHeader`, `iFooter`, `iExpr`, `iLiteral` would be
descriptive enough (everyone is going to be calling these
istrings, even though they are Interpolation Expression
Sequences).
This is the time to debate, before it's released!
-Steve
More information about the Digitalmars-d
mailing list