[OT] What should be in a programming language?

BCS none at anon.com
Tue Oct 27 13:50:15 PDT 2009


Hello Denis,


> I believe templates are better be written in imperative style. That's
> why  a built-in "type" type is needed.

The problem there is that real template (that, at compile time, generate 
a difference instance per type) are fundamentally declarative rather than 
imperative. What might work best is having template be declarative but provide 
powerful enough compile time imperative constructs that make functional programing 
(e.g. C++ style meta programming) more or less pointless.

The thought is that rather than mix compile time and runtime imperative construct 
the template can /declare/ "there is a ___" but can access pure compile time 
constructs to do whatever processing/computation is needed.





More information about the Digitalmars-d mailing list