Compile time iota

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Fri Jan 23 09:48:44 PST 2015


On 1/23/15 7:21 AM, Dicebot wrote:
> So, to put it clear : do you approve merging
> https://github.com/D-Programming-Language/phobos/pull/2687 in general?
> (without any details about actual std.meta module layout etc). Assuming
> that old std.typetuple will be kept deprecated and (eventually) hidden
> from docs without removal for a very long time of course.

I made a pass through the entire document and discussion and it seems to 
need a few improvements before being pulled.

The main issues I see are (a) the names changed from a confusing word to 
a confusing idiom; (b) the Pack template, probably the one thing that 
could add value to the establishment, is private.

So in the bad old times we had this confusing name Typelist in 
std.typelist and some okay/meh names like staticMap and staticIndexOf.

With the new coolness std.typelist.Typelist is std.meta.list.List. That 
is confusing if used standalone as "List" after importing 
"std.meta.list" and a good mouthful to use with full qualification, so 
the following idiom is proposed:

import meta = std.meta.list;

This doesn't sound good. If one is in the need for some list-specific 
stuff, how come they have to import std.meta.list and then call it meta? 
Does one ever use import container = std.container.array?

Also there's only std.meta.list and no other std.meta.xxx. Is there a 
plan there?

Why not use packages etc? Just define TemplateList and TemplatePack in 
std.meta and call it a day.


Andrei



More information about the Digitalmars-d mailing list