Simplifying templates
dfgh
dfgh at mailinator.com
Sun Nov 30 08:00:07 PST 2008
Michel Fortin Wrote:
> Interesting. Have you seen the thread I started last Tuesday suggesting
> mostly the same thing: treating types like values? I ended up with what
> looks like a solution to get rid of most uses for templates (replacing
> them with compile-time-only functions returning types).
>
> Look for 'The "type" type dream', starting here:
> <http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=80077>
>
> --
>
>
> Michel Fortin
> michel.fortin at michelf.com
> http://michelf.com/
>
That is very similar to my idea, except it would allow dynamic typing. We do have dynamic typing to some extent in D (Variant's, variadic functions), but it slows down code. I prefer enforcing static typing, especially given D's design goals, such as systems programming. Code that needs dynamic typing is the exception, so it gets Variant's rather than a part of the core language.
--Sam
More information about the Digitalmars-d
mailing list