[D-runtime] TypeInfo_Invariant -> …_Immutable?

Jonathan M Davis jmdavisProg at gmx.com
Wed Oct 2 11:06:36 PDT 2013


On Wednesday, October 02, 2013 17:46:45 David Nadlinger wrote:
> On Wed, Oct 2, 2013 at 4:14 PM, Iain Buclaw <ibuclaw at ubuntu.com> wrote:
> > There's probably someone somewhere that uses TypeInfo_Invariant in their
> > code (eg: std.format maybe?)
> 
> Oh dear, TypeInfo_Invariant is indeed used once in the the deprecated,
> undocumented part of std.format. And it directly checks for the
> occurrence of "Invariant" in the mangled name, something that would
> inevitably break if we renamed the class.
> 
> Still, I feel that oddities like this decrease the "hackability" of
> the D tool chain – maybe we should just stick a big red notice in the
> code comments?

I don't see any problem with just renaming it, creating an alias to the old 
name, and deprecating the alias. It requires a change in std.format, but that 
can obviously be done. At that point, I don't see any problem with std.format 
(though maybe I'm missing something). What about the typical renaming and 
deprecation process wouldn't work? This isn't even a symbol that's likely used 
much in user code.

- Jonathan M Davis


More information about the D-runtime mailing list