[contest] Is a Cow an animal ++
Denis Koroskin
2korden at gmail.com
Wed Sep 29 00:32:40 PDT 2010
On Wed, 29 Sep 2010 11:21:11 +0400, Norbert Nemec
<Norbert at nemec-online.de> wrote:
> IMHO, the test misses the point of compile-time metaprogramming: The
> concept of "state" belongs to run-time. The D compile-time language is
> purely functional and does not know a state or even an "order of
> execution".
>
> The conditions "cannot die or be eaten twice" are, at their core, issues
> of state. Any "solutions" that claim to catch one of the last three
> errors must either go beyond the purely functional nature of the
> compile-time language or rely on additional constraints (e.g. no reuse
> of previous elements)
>
> Of course, one could devise a language with non-functional compile time
> features, but within D, this would fundamentally break the existing
> concept of meta-programming.
>
>
In D, there are templates (that are written in functional style, have no
state etc) and there is also CTFE that allows mutable state (but no
classes).
More information about the Digitalmars-d
mailing list