Yigal Chripun wrote:
On 12/10/2009 18:45, BCS wrote:
Hello Michel,
On 2009-10-09 15:49:42 -0400, Andrei Alexandrescu
said:
Thanks!
I plan to add more text at the end of the chapter that discusses the
opportunities of CTFE. Walter revealed to me that CTFE, particularly
now after it's been i
On 12/10/2009 18:45, BCS wrote:
Hello Michel,
On 2009-10-09 15:49:42 -0400, Andrei Alexandrescu
said:
Thanks!
I plan to add more text at the end of the chapter that discusses the
opportunities of CTFE. Walter revealed to me that CTFE, particularly
now after it's been improved by leaps and b
Hello language_fan,
Sat, 10 Oct 2009 10:26:11 +0200, Don thusly wrote:
CTFE doesn't mean "string mixins using CTFE". It just means CTFE.
(BTW you can do string mixins with templates only, no CTFE, if you
are completely insane).
CTFE without mixins is rather limited form of metaprogramming. Y
Hello Michel,
On 2009-10-09 15:49:42 -0400, Andrei Alexandrescu
said:
Thanks!
I plan to add more text at the end of the chapter that discusses the
opportunities of CTFE. Walter revealed to me that CTFE, particularly
now after it's been improved by leaps and bounds by Don and by Walter
himsel
Hello Don,
CTFE doesn't mean "string mixins using CTFE".
It just means CTFE. (BTW you can do string mixins with templates only,
no CTFE, if you are completely insane).
I'm guilty of proving this by building a *parser* that runs at compile time
without using CTFE.
Mon, 12 Oct 2009 14:01:59 +0200, Don thusly wrote:
> language_fan wrote:
>> As far as I can tell there is no reason why you cannot call templates
>> from a CTFE code. Your code above has two problems: a) it never
>> terminates
>
> It wasn't meant to be a compilable example.
>
> b) due to some lo
On Mon, 12 Oct 2009 16:01:59 +0400, Don wrote:
language_fan wrote:
Mon, 12 Oct 2009 12:07:19 +0200, Don thusly wrote:
language_fan wrote:
Sat, 10 Oct 2009 10:30:31 +0200, Don thusly wrote:
The more fundamental problem is that you can't instantiate a template
from inside CTFE. IE, you can
language_fan wrote:
Mon, 12 Oct 2009 12:07:19 +0200, Don thusly wrote:
language_fan wrote:
Sat, 10 Oct 2009 10:30:31 +0200, Don thusly wrote:
The more fundamental problem is that you can't instantiate a template
from inside CTFE. IE, you can cross from the "compile-time world" to
the "runtim
Mon, 12 Oct 2009 12:07:19 +0200, Don thusly wrote:
> language_fan wrote:
>> Sat, 10 Oct 2009 10:30:31 +0200, Don thusly wrote:
>>
>>> The more fundamental problem is that you can't instantiate a template
>>> from inside CTFE. IE, you can cross from the "compile-time world" to
>>> the "runtime wor
language_fan wrote:
Sat, 10 Oct 2009 10:26:11 +0200, Don thusly wrote:
CTFE doesn't mean "string mixins using CTFE". It just means CTFE. (BTW
you can do string mixins with templates only, no CTFE, if you are
completely insane).
CTFE without mixins is rather limited form of metaprogramming. Yo
language_fan wrote:
Sat, 10 Oct 2009 10:30:31 +0200, Don thusly wrote:
The more fundamental problem is that you can't
instantiate a template from inside CTFE. IE, you can cross from the
"compile-time world" to the "runtime world" only once -- you can never
get back.
That's not exactly true. A
On 2009-10-10 16:56:33 -0400, language_fan said:
And from that point of view, you can see templates as an compiled,
optimized version of runtime reflection and type creation capabilities.
Runtime reflection can be really expensive computationally, but it
becomes useful when you need mobile co
Fri, 09 Oct 2009 16:49:19 -0400, Jarrett Billingsley thusly wrote:
> Where CTFE wins at metaprogramming:
>
> Liiists. If you have a list of something, it's far easier to
> deal with in an imperative CTFE function than in an awkwardly recursive
> template. Edge cases (first, last items) ar
Fri, 09 Oct 2009 20:20:02 -0400, Michel Fortin thusly wrote:
> But an interesting thing I realized in the last few months is this: all
> you can do with a template you can also do at runtime provided
> sufficient runtime reflection capabilities. Even creating types!
This is a well known fact..
>
Sat, 10 Oct 2009 01:21:32 -0400, bearophile thusly wrote:
> Jeremie Pelletier:
>
>> I would rather have TypeInfo usable at compile time than a "type" type.
>
> That's useful, but it's not enough. So you may want both. Sometimes all
> you want to pass to a function is a type, to replace some of
Sat, 10 Oct 2009 10:26:11 +0200, Don thusly wrote:
> CTFE doesn't mean "string mixins using CTFE". It just means CTFE. (BTW
> you can do string mixins with templates only, no CTFE, if you are
> completely insane).
CTFE without mixins is rather limited form of metaprogramming. You can
basically o
Sat, 10 Oct 2009 10:30:31 +0200, Don thusly wrote:
> The more fundamental problem is that you can't
> instantiate a template from inside CTFE. IE, you can cross from the
> "compile-time world" to the "runtime world" only once -- you can never
> get back.
That's not exactly true. Also both templat
Jarrett Billingsley wrote:
On Fri, Oct 9, 2009 at 4:57 PM, Sean Kelly wrote:
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article
Thanks!
I plan to add more text at the end of the chapter that discusses the
opportunities of CTFE. Walter revealed to me that CTFE, particul
Jarrett Billingsley wrote:
On Fri, Oct 9, 2009 at 3:49 PM, Andrei Alexandrescu
wrote:
Thanks!
I plan to add more text at the end of the chapter that discusses the
opportunities of CTFE. Walter revealed to me that CTFE, particularly now
after it's been improved by leaps and bounds by Don and b
Jeremie Pelletier:
> I would rather have TypeInfo usable at compile time than a "type" type.
That's useful, but it's not enough. So you may want both. Sometimes all you
want to pass to a function is a type, to replace some of the use cases of
templates. Time ago I have shown some usage example
On 2009-10-09 15:49:42 -0400, Andrei Alexandrescu
said:
Thanks!
I plan to add more text at the end of the chapter that discusses the
opportunities of CTFE. Walter revealed to me that CTFE, particularly
now after it's been improved by leaps and bounds by Don and by Walter
himself, could ob
bearophile wrote:
Sean Kelly:
CTFE is great for working with values while template metaprogramming is
great for working with types. String mixins make CTFE good at working
with types as well, but I wouldn't consider them a novice-level feature.
If a "type" type is added to the language (and
Sean Kelly:
> CTFE is great for working with values while template metaprogramming is
> great for working with types. String mixins make CTFE good at working
> with types as well, but I wouldn't consider them a novice-level feature.
If a "type" type is added to the language (and few other minor
On Fri, Oct 9, 2009 at 4:57 PM, Sean Kelly wrote:
> == Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article
>> Thanks!
>> I plan to add more text at the end of the chapter that discusses the
>> opportunities of CTFE. Walter revealed to me that CTFE, particularly now
>> after it
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article
> Thanks!
> I plan to add more text at the end of the chapter that discusses the
> opportunities of CTFE. Walter revealed to me that CTFE, particularly now
> after it's been improved by leaps and bounds by Don and by Walter
Andrei Alexandrescu Wrote:
>
> One question that bugs me is, where do you draw the line? Say there's a
> metaprogramming problem at hand. How to decide on solving it with CTFE
> vs. solving it with templates? It would be great to have a simple
> guideline that puts in contrast the pluses and mi
On Fri, Oct 9, 2009 at 3:49 PM, Andrei Alexandrescu
wrote:
> Thanks!
>
>
> I plan to add more text at the end of the chapter that discusses the
> opportunities of CTFE. Walter revealed to me that CTFE, particularly now
> after it's been improved by leaps and bounds by Don and by Walter himself,
>
On Fri, Oct 9, 2009 at 4:28 PM, Lutger wrote:
> Jarrett Billingsley wrote:
>
>> The second someone suggests parsing D code with CTFE, I'm out of here.
>> I mean I'm leaving the community. Period.
>
> Here, for you:
>
> http://www.addletters.com/pictures/bart-simpson-generator/bart-simpson-
> gener
Jarrett Billingsley wrote:
> The second someone suggests parsing D code with CTFE, I'm out of here.
> I mean I'm leaving the community. Period.
Here, for you:
http://www.addletters.com/pictures/bart-simpson-generator/bart-simpson-
generator.php?line=I+will+not+parse+D+code+with+CTFE!
"Andrei Alexandrescu" wrote in message
news:hao44m$2g5...@digitalmars.com...
>
> It is quite possible that templates get relegated to parameterized
> functions and types, whereas all heavy lifting in metaprogramming should
> be carried with CTFE.
>
I've been told that the reason C#'s generics
On Fri, Oct 9, 2009 at 3:49 PM, Andrei Alexandrescu
wrote:
> Thanks!
>
>
> I plan to add more text at the end of the chapter that discusses the
> opportunities of CTFE. Walter revealed to me that CTFE, particularly now
> after it's been improved by leaps and bounds by Don and by Walter himself,
>
Thanks!
I plan to add more text at the end of the chapter that discusses the
opportunities of CTFE. Walter revealed to me that CTFE, particularly now
after it's been improved by leaps and bounds by Don and by Walter
himself, could obviate a lot of the traditional metaprogramming
techniques d
32 matches
Mail list logo