Boost logo

Boost :

From: dietmar_kuehl (dietmar_kuehl_at_[hidden])
Date: 2002-02-18 12:37:25


i,

> "What are the most needed or desired features in C++ for modern
library
> writing in general and Boost in particular?"

What does qualify as "most needed"? Clearly, some features would
probably be useful and current C++ cannot do emulate them. 'typeof',
when done correctly, probably falls into this category while typedef
templates probably do not (they can be emulated similarily to the
'rebind' class).

Currently not available but IMO crucial features are

- typeof. That's a must have! Whether there are additional features
  like auto to declare variable of a corresponding type is secondary
  to me (this can be emulated by calling a corresponding function
  anyway; this does not apply to typeof which is necessary to
  specific return types).

- Better type information, possibly in the form of Bjarne's XTI
  (however, I haven't seen details on this one, yet). Some of the
  stuff, eg. things like 'is_pod' should be available at compile
  time, though, because it allows certain important optimization (eg.
  to move objects rather than copy/destruct them).

Both of these features deal with data available to the compiler
anyway. It is just thrown away without access from the program. I
think this stuff "merely" needs an interface and is probably not too
hard to implement (I'm not a compiler writer, however). And the
interface itself isn't probably that hard once the requirements are
nailed down.

In a category I would label as "rather useful but not necessarily
crucial" (because it can be emulated already, although it takes more
effort than if the feature were available), I would place the
following:

- Some form of lambda expression, ie. creating functor on the fly. The
  exact form is probably less than a problem than a neat interface (I
  had several tries on that one, never with satisfactory results).
  Although closures (ie. access to variable in the creating scope;
  probably with "undefined behaviro" if the functor is used after the
  creating scope is exited - no garbage collection shall be introduced
  just for that) would be nice, I don't consider them to be a must
  have.

- Templatizing on constness/volatileness eg. to implement transitive
  constness for attribute access. This would make duplicate and except
  for constness identical implementation unnecessary.

Since everybody is tossing out ideas and these discussions tend to go
out of hand when everybody emits his/her pet feature(s), I think
everybody writing about new features is implicitly volunteering to
write down proposals on the corresponding language features :-) That
is, a full analysis on how the feature is supposed to look like, what
problems it would solve, how it interacts with other features in the
language, the impact on existing code, wording for the sections to be
changed or added to the standard, etc. Just tossing out ideas and
hoping that someone else will do the work seems a little bit
optimistic... (since most of the issues I brought up were mentioned
before, I think I'm only volunteering for the cv-qualifier
templates :-)

Regards,
  Dietmar

--
<mailto:dietmar_kuehl_at_[hidden]> <http://www.dietmar-kuehl.de/>
Phaidros eaSE - Easy Software Engineering: <http://www.phaidros.com/>

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