D Conference Tango Phobos
jcc7
technocrat7 at gmail.com
Fri Sep 14 12:53:27 PDT 2007
== Quote from Bill Baxter (dnewsgroup at billbaxter.com)'s article
> Jascha Wetzel wrote:
> > Sean Kelly wrote:
> >> Well, the first issues to address are the few incompatibility
> >> points between Tango and Phobos within the runtime, the most
> >> visible being Object.toString in Phobos vs. Obejct.toUtf8 in
> >> Tango. This likely means toUtf8 in Tango will have to change to
> >> toString, so if anyone absolutely hates the idea, you're welcome
> >> to say so :-) However, I suspect there is a quiet majority using
> >> Phobos, so even valid arguments against the way it does things
> >> may have to be ignored if the change would break some
> >> user-visible portion of the Phobos library.
> >> Suggestions here are welcome also.
> >
> > ridiculously, the only reason i can come up with, that kept me
> > from using tango in programs that don't use networking, is the
> > verbose string formatting syntax (i don't want to start a
> > discussion about which one is better. i consider it a matter of
> > taste).
> > when tango and phobos will co-exist painlessly, i'll probably be
> > using std.stdio, std.format and everything else from tango :)
> The only thing I really use consistently from Phobos that I actually
> *like* using is std.stdio. The thought has occurred to me a few
> times that Tango would be much more attractive to me if it only had
> writefln.
>
> I tried Tangobos but it states pretty clearly that it's not
> intended as a long-term solution, and that you are expected to
> use it as a transition crutch as you finish porting your code to
> pure Tango. But I don't *want* to get rid of my writefln's. I
> *like* them.
>
> I thought maybe I was the only one with such irrational attachments,
> but it seems I'm not alone. :-) If that's the case then hopefully
> someone will make a port of std.stdio to Tango at some point. That
> makes more sense to me than everybody rolling their own as Sean
> suggests.
>
> --bb
I basically agree.
I don't think it's irrational at all to prefer writefln. That's what I prefer.
That's what I know better. That's what my console example code uses (and most of
my examples are console-only). I spent enough time learning the Tango way of
displaying text to discover it's not easy to switch between using Phobos and Tango
(such as by using version statements) if a program sends much text to the console.
And the programs I write in D typically send enough text to the console to make
the differences matter. As others have written, it's largely matter of style more
than anything else, but it's impractical for me to have to want to learn another
style when I already know how to write code that works with the default set up of
DMD. I haven't been that enticed yet by the other goodies that Tango offers to get
over that.
If the Tango crowd think it's a principled position to not include std.stdio's
writefln, then I think it is an equally principled position to not use Tango as
long as it excludes a std.stdio-style writefln. ;)
More information about the Digitalmars-d
mailing list