Phobos vs Tango! What's your opinion?

Johan Granberg lijat.meREM at OVEgmail.com
Wed Apr 18 09:38:29 PDT 2007


Sean Kelly wrote:
> 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

I disagree whit it being appropriate to leave the creation of shorthand
functions to the users of a library. Of course it's unfeasible to define
all the functions potential users might need but I think thouse most needed
or used should be defined in the library. This can help to reduse code size
of small programs or modules significantly. Regarding the exceptions or
error codes issue it could be solved either by providing to versions of the
utility functions or by choosing one of them, in the later case the
rational is that it is easier to only have to do error handling yourself
rather that having to do both error handling and class wrapping.

Othervise tango looks great and much more compleat than phobos.



More information about the Digitalmars-d mailing list