Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2000-07-23 16:28:49


The template mechanism is equivalent to a functional programming language.
What is this construct called in Lisp? Ugh, I think it's called 'if'.

What is the ?: operator called in C/C++?

BTW, I attended a Generic Programming conference with C&E in '98
http://www.cs.rpi.edu/~musser/gp/dagstuhl/gpdag.html where they talked about
generative programming. Most of it seemed to be a pile of buzzwords and
excitement with little to back it up, but they did present a complete lisp
interpreter implemented at compile-time with C++ templates!

----- Original Message -----
From: "Greg Colvin" <greg_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Sunday, July 23, 2000 4:42 PM
Subject: Re: [boost] metactrl header [compile time asserts]

> From: David Abrahams <abrahams_at_[hidden]>
> > I totally support all of Howard's arguments below :)
>
> Me too. But what names to use? Howard's names for 'IF'
> don't make it so clear what the meaning of the parameters
> is. Maybe 'If' would do?
>
> Or if we are feeling very brave, how about something like
> #define If whatever<
> #define Then ,
> #define Else ,
> #define End >::type
> so that instead of the inscrutable
> typedef If<flag, type1, type2>::type my_type;
> we can write
> typedef
> If flag Then
> type1
> Else
> type2
> End
> my_type;
>
> And Howard thought he was getting punchy!
>
>
>
> ------------------------------------------------------------------------
> Find long lost high school friends:
> http://click.egroups.com/1/7080/4/_/9351/_/964385287/
> ------------------------------------------------------------------------
>
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk