Phobos vs Tango! What's your opinion?
Sean Kelly
sean at f4.ca
Wed Apr 18 09:05:17 PDT 2007
Deewiant wrote:
>
> I don't quite agree with this, but I do prefer free functions in many cases. I
> can accept having a File class for "heavy-duty" file handling, but I still find
> myself missing a simple function for just dumping an ubyte[] array of a file's
> contents.
I prefer free functions in many cases as well. However, different
people have different needs in this area. Some may want such functions
to throw an exception on error, others may want a return code, etc.
With this in mind, I feel it is often more appropriate to let the
programmer define such things for themselves. Particularly since the
process is typically trivial. The only issue with wrapping object
libraries is the risk of overhead from the construction of disposable
objects, but between 'scope' allocation for classes and Tango's tendency
towards highly efficient designs (IMO), I don't think that's a concern here.
Sean
More information about the Digitalmars-d
mailing list