std.data.json formal review
Andrei Alexandrescu via Digitalmars-d
digitalmars-d at puremagic.com
Tue Aug 18 09:22:30 PDT 2015
On 8/18/15 11:39 AM, Johannes Pfau wrote:
> No, this won't improve the ASM much: Enum values start at 0 and are
> consecutive. With a final switch they're also bounded. All these points
> do not apply to pointers. They don't start at 0, are not guaranteed to
> be consecutive and likely can't be used with final switch. Because of
> that a switch on pointers can never use jump tables.
I agree there's a margin here in favor of integers, but it's getting
thin. Meanwhile, pointers maintain large advantages of principle. I
suggest we pursue better use of pointers as tags instead of adding
integral-tagged unions to phobos. -- Andrei
More information about the Digitalmars-d
mailing list