John Reimer wrote:
Hello dsimcha,

== Quote from Daniel Keep (daniel.keep.li...@gmail.com)'s article

Piotrek wrote:

Lars Ivar Igesund wrote:

Tango will stay Tango (and tango.*). The above naming assumes that
Tango will depend on Phobos, and it will not.

I see.

Cheers

(Note: speaking as merely an infrequent contributor to Tango; my
opinion
is my own and does not reflect on those of the Master Dancers, or the
ruling council of glittery-shoed programmers.)
(Warning: semi-rant ahead.)
The problem is that Phobos and Tango are diametrically opposed in
almost
every conceivable way.  Bringing them together would be like trying
to
bring matter and anti-matter together; you're just going to blow
yourself up.
It's best if you think of Phobos as being Python and Tango as being
Java.  Phobos implements a relatively flat (if messy) hierarchy of
simple, fat classes.  For example, IO is done using the Stream
interfaces, each one implements all the methods you'd probably need
to
work with streams.
Tango, on the other hand, implements a very deep (if confusing)
hierarchy of simple, component interfaces that get plugged together.
Unlike Phobos, IO in Tango has many layers and components, each of
which
is very narrowly defined, allowing you to plug them together however
you
like.
The problem is that neither of these approaches is WRONG.  They're
both
valid and arguably better in certain circumstances.  What's more, the
continued existence of both shows that there are people who believe
in
each of them (not necessarily at the same time, but there you go.)
So let's say we combined them into std.* and stdex.*.  Why is Tango
stdex?  Why isn't Tango std.* and Phobos stdsimple?
Ok, ignoring egos, the problem is that they wouldn't work together
anyway.  An old favourite of mine is (again, sorry about this) IO.
Phobos strives to be compatible with the C IO library; so you can
interleave Phobos and C IO calls and it's all gravy.
Tango takes C out the back and shoots it before burying it
upside-down
at a crossroads with a steak through the heart and salting the earth.
You CAN mix Tango and C IO calls, but you really have no idea what
order
the output's going to arrive in.
I remember Andrei getting antsy about this a while back; why break
compatibility?!  Because Tango's IO was faster this way.  Neither one
of
them was 'right' because they both had legitimate points of view.
Really, it all boils down to this: there *is no* one right way.  Yes,
it's more confusing.  But it's a problem with programming in general;
programming is all about looking at your options and making a
decision
on the matter.
-- Daniel
Wow.  Excellent analysis.  One thing I'd like to add is that Phobos
tends to be
much more focused on the bleeding edge, with pretty much all
development happening
on the D2 branch, while Tango is more focused on targeting stable
compilers.

Also, another way I would summarize the situation is that Phobos
focuses on first
making simple operations simple first and foremost, and then worries
about making
complicated operations possible, while Tango does just the opposite.

I don't know if that is strictly true. In Tango's defense, I believe it has tried quite hard to move in the direction of making simple things simple even under the restrictions of its own philosophy :). If you examine the progression of Tango revisions, there has been a significant "cleanup" in progress that appears to be simplifying what was originally verbose.

I've said this before, but I think it's not so bad for D to have two
standard libraries with different design philosophies, at least in
principle, though the inability to use both side by side on D1 is
obviously a bad thing.  There are times when I like the Phobos "keep
it simple, stupid" approach and times when I want Tango's "everything
but the kitchen sink" approach.  There are a few things that I think
would help a lot here:


1.  Both Phobos and Tango should adopt these opposite design
philosophies, which are true de facto anyhow, officially.  This will
prevent excessive feature envy and duplication of effort and allow
newcomers to determine which is best for their everyday use.

Like I said, I believe Tango has worked harder at doing this than you might think. I don't think Phobos cares to look at the opposite philosophy because it really doesn't merge well with it's intended goals. Tango can afford some brevity because it started at the verbose end.


2.  The creation of druntime so that Phobos and Tango can be used side
by side is a huge step forward.  Once D2 is out of alpha and Tango is
ported to D2, people will be able to use their preferred lib most of
the time and the other when their preferred lib has some missing
functionality.  This will also greatly simplify 3rd party libs.



This somehow parallels my original thinking too which I've mentioned before. I am all for the druntime, and it certainly will be a net gain if both Tango V2 (if it ever surfaces complete) and Phobos can share it once D2 is stable. But I'm afraid, it is still a grave difficulty for new users to face two different libraries. Now that I've waited and think about it longer, I'm not sure what to make of it. How does one promote this twin package deal for D. I predict that the first person that finds a clever way to promote D 2.0 and it's shiny new twin-library / pick-your-style feature will be a D hero forever. ;-)
No, it's not bad.

<small rant>
I completely disagree. I think the two libraries is a disaster. I can see that so many people have been exposed to a lifetime of propaganda that "competition is a good thing", but it's just propaganda. Competition inevitably means wasted effort, and it's obvious in D.
</small rant>

Note, however that the gulf between Phobos and Tango mostly exists in I/O; and C++ also has two I/O packages (the one inherited from C, and the awful iostreams). So I don't think this is a big a problem as stated. If we work at it, we could move the difference to be entirely a I/O difference. But that would require willingless to do it, and I'm not sure that it's really there.

<big rant>
In my attempt to bring both libraries together I have experienced reactions from both sides which appeared hostile (or at least reluctant) to a merger. Apart from Sean and myself, I don't see much evidence that people actually want them to merge. They just want the other one to disappear.
</big rant>

Reply via email to