At 02:08 PM 8/18/2003, Edward Diener wrote:

>... one of the reasons, as I understand it, for
>boost::function and boost::bind is so the end-user has the benefit of
>defining his callback as he sees fit and not have it more rigidly dictated
>by the implementation. That is the main reason I support such a callback
>for boost::filesystem checking for pathname validity; it gives the end-user
>maximum flexibility while letting the internals of boost::filesystem deal
>with the result of the callback as it sees fit. Inevitably, somewhere down
>the road, programmers will say that the callback system is too rigid for
>their needs, no matter how simple is seems as if it should be now. With
>boost::function such a complaint is very close to impossible. I am not
>trying to create more work for the implementor, only suggesting that the
>most flexible callback implementation done now will save possibly more work
>in the future and be beneficial to end-users.


Edward,

If we loaded Boost.Filesystem up with every feature which would be beneficial to some user at some future time, it would be full of caches, allocators, path translators, vast numbers of compound operations, file system virtualizers, generation dataset emulators, partitioned dataset emulators, and a lot of other stuff. Some, like wide-character path names, I'd dearly love to add. Everything on that list is useful, sometimes very useful.

But if all those features were added, the library would almost certainly become so difficult to learn and use that it would no long meet its primary goal of being able to "perform portable script-like [file and directory] operations from within C++ programs".

Maybe enough real-world use cases will arise to make it worthwhile to add boost::function (or several other Boost libraries which might bring quite a lot to the table.) But it needs a stronger justification that just that it might benefit some users. Boost::function is also something that could be added later without breaking existing code, AFAICS.

--Beman

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to