January 25, 2006 Re: Why do meta programming with templates? | ||||
---|---|---|---|---|
| ||||
Posted in reply to James Dunne | James Dunne wrote: > Tom S wrote: >> I'm getting the impression that we're trying to clone the language functionality into the compile-time part. We had a nifty proposal some time ago which, if implemented, might ease the pain. >> The idea was to allow a special modifier for functions which would say that they could be evaluated at compile-time. Thus the code would look just like ordinary runtime code, but being executed at compile-time. >> >> >> > > If I'm not mistaken, that was mine =P. Use the colon operator to differentiate compile-time properties from run-time properties! Either that or it was my '{%' ... '%}' block idea which was to execute code at compile time (though I never proposed this for D). Sorry to disappoint you, James, but that wasn't your proposal :P It was Bill Baxter who originally started the discussion here: http://www.digitalmars.com/d/archives/digitalmars/D/23175.html Eventually, Walter commented: http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/24126 -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M d-pu s+: a-->----- C+++$>++++ UL P+ L+ E--- W++ N++ o? K? w++ !O !M V? PS- PE- Y PGP t 5 X? R tv-- b DI- D+ G e>+++ h>++ !r !y ------END GEEK CODE BLOCK------ Tomasz Stachowiak /+ a.k.a. h3r3tic +/ |
January 25, 2006 Re: Why do meta programming with templates? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tom S | Tom S wrote:
> Sean Kelly wrote:
>
>> BCS wrote:
>>
>>> I am still wondering why templates are being used for this. Is it just that they are the only tool at hand?
>>
>>
>>
>> Pretty much. The goal is to be able to generate optimal code at compile-time with minimal user effort... and to do so using language features instead of a fancy IDE.
>
>
>
> I'm getting the impression that we're trying to clone the language functionality into the compile-time part. We had a nifty proposal some time ago which, if implemented, might ease the pain.
> The idea was to allow a special modifier for functions which would say that they could be evaluated at compile-time. Thus the code would look just like ordinary runtime code, but being executed at compile-time.
>
>
They already have such a thing in Common Lisp and Scheme. Its called a macro, and its the thing most Lispers refuse to give up to take another language.
-DavidM
|
January 25, 2006 Re: Why do meta programming with templates? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tom S | Tom S wrote: > James Dunne wrote: > >> Tom S wrote: >> >>> I'm getting the impression that we're trying to clone the language functionality into the compile-time part. We had a nifty proposal some time ago which, if implemented, might ease the pain. >>> The idea was to allow a special modifier for functions which would say that they could be evaluated at compile-time. Thus the code would look just like ordinary runtime code, but being executed at compile-time. >>> >>> >>> >> >> If I'm not mistaken, that was mine =P. Use the colon operator to differentiate compile-time properties from run-time properties! Either that or it was my '{%' ... '%}' block idea which was to execute code at compile time (though I never proposed this for D). > > > Sorry to disappoint you, James, but that wasn't your proposal :P It was Bill Baxter who originally started the discussion here: > http://www.digitalmars.com/d/archives/digitalmars/D/23175.html > > Eventually, Walter commented: > http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/24126 > > > Ah geezz... -- Regards, James Dunne |
Copyright © 1999-2021 by the D Language Foundation