May 08, 2004 Re: foreach over struct, enum, class | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kevin Bealer | Kevin Bealer wrote:
>
> I'm thinking more along the lines of compile time. For compile time, the "big"
> feature that all this points to, is code generation that is part of the
> language.
>
> In other words, routines that run at compile time, and build boilerplate code in
> some reasonable way.
>
> C++ programmers are trying to do this with the "pseudo functional language" of
> template metaprogramming, and it is a horrible mess, readability, portability
> and stability wise. And of course there are programs that write code based on
> IDLs and so on. Also, the C preprocessor is used this way: consider macros
> named DO_10_TIMES and DO_100_TIMES as a way of doing stone-age loops.
>
> It would be useful to have a good way to do this, in the language, to replace
> all the bad ways that people are doing it, NEAR the language. The fact that
> people are doing it in a kludgey way, tell me that the time has come for it.
I agree wholeheartedly. The C++ template language may be semantically complete but it's a bear to use for code generation, which has become quite popular in the past few years. While templated typedefs will probably help quite a bit, some attention really needs to be paid to fleshing out the template language specifically for code generation. I'd love to see the same thing happen with D.
Sean
|
May 08, 2004 Re: foreach over struct, enum, class | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | "Walter" <newshound@digitalmars.com> wrote in message news:c7gu2p$1jna$1@digitaldaemon.com... > > "Walter" <newshound@digitalmars.com> wrote in message news:c7grbl$1fho$2@digitaldaemon.com... > > I've been exchanging email with some C++ > > template exports who feel the same way you do. > > That should be "experts". Talk about a freudian slip! LOL > Well there are a few of both here arent there lol. C++ experts and C++ exports! Phill. > |
May 10, 2004 Re: foreach over struct, enum, class | ||||
---|---|---|---|---|
| ||||
Posted in reply to J Anderson | J Anderson wrote: > Walter wrote: > >>> I agree. I discussed something along compile-time-functions, ages ago >>> but got little response. >>> >> >> >> Can you point me towards your postings on this? >> >> > Humm. It's in the old d newsgroup and I couldn't search by google. I can give you the subject title and date, if your using a newsreader: > > Title: Idea - Compile Time functions > Date: 9/23/2003 1:21 AM Sounds like: http://www.digitalmars.com/drn-bin/wwwnews?D/17623 > > The idea changes a bit at the end of the thread. -- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/ |
Copyright © 1999-2021 by the D Language Foundation