|
Boost : |
From: David Abrahams (abrahams_at_[hidden])
Date: 2001-04-16 18:49:08
----- Original Message -----
From: "Jeremy Siek" <jsiek_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Monday, April 16, 2001 12:12 PM
Subject: [boost] Boost.Graph: named parameters/major interface change
>
> I've been looking into using the named parameters technique
> for the algorithm interfaces in the Boost Graph Library.
> For example, calling Dijkstra's algorithm would look like
> this:
>
> dijkstra_shortest_paths(g, s, distance_map(d).predecessor_map(p));
>
> There are several advantages to this:
> - defaults no longer order-dependent
> - better readability
> - better defaults for "utility" properties. E.g., for color map
> the algorithm can by default use an internally allocated array.
>
> Ideally, we'd keep the old interface (and call it deprecated) and add
> functions for the new named parameter interface. However, there are a few
> places where the new functions would interfere with the old in terms of
> function overloading.
>
> So there's two options:
>
> 1) Ditch the old interface, replace it with the new.
>
> 2) Keep the old interface, use different names for the new functions.
>
>
> I'm in favor of option 1), but if there are strong feelings for
> option 2) I can be swayed.
I'm with you on this one.
-Dave
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk