Boost logo

Boost :

From: jk_at_[hidden]
Date: 2002-02-20 02:01:19


18 Feb 2002 11:13:38 +0300 Herb Sutter ÎÁÐÉÓÁÌ:
>Pardon if this has already been discussed on the list, but I'd like your
>feedback on this question: "What are the most needed or desired features in
>C++ for modern library writing in general and Boost in particular?"
>
>Two usual suspects:
> - typedef templates
> - typeof (with gcc semantics?)
>
>What else should be on the list? For example, is there language support that
>would assist type traits?

There is one feature I'd like to see that is considered by nobody so
far, as far as I know: compiler-generated accessor member functions.
Let us say, there is a struct:

struct foo {
     int bar;
     char *baz;
     // implicitly generated inlines:
     // int __member_bar() const { return bar; }
     // char *__member_baz() const { return baz; }
};

Then one could use accessor members as if they are inline member
functions:

int main() {
     foo qux;
     int something=qux.__member_bar();
     char *another=qux.__member_baz();
}

It could be very useful for functional-style programming and for using
lambda-like libraries.

-- 
jk

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