questions on PhanTango 'merger' (was Merging Tangobos into Tango) - long-term vision

Lars Ivar Igesund larsivar at igesund.net
Thu Oct 11 01:22:34 PDT 2007


Generally I think you make a comment on an uninformed basis, but I'll try to
put you straight :)

BCS wrote:

> Lars Ivar Igesund wrote:
>> 0ffh wrote:
>> 
>> 
>>>Kris wrote:
>>>
>>>>Perhaps another way to ask these questions might be this:  what
>>>>type/style
>>>>of phobos functionlaity would you like to see in Tango?  BCS hinted at
>>>>this early on, and it would be useful to hear more of that ...
>>>
>>>What I like most about Phobos is it's ease-of-use and it's style.
>> 
>> 
>> That you like the style is a fair point, but as I mentioned elsewhere, I
>> think that generally should be a secondary consideration. ease-of-use
>> however should be much more important. So my question is, does Phobos'
>> style make it easier for you to use? Is this due to free standing
>> functions, or because Phobos has few modules to search through? If the
>> latter, would a different type of docs, showing where to find
>> functionality in Tango, be of help?
>> 
> 
> I think that style and ease of use are tightly linked. In Phobos, if you
> want to write to the screen you use writef and it dumps a pile of stuff
> to the screen. In tango (from what I've seen) you get a reference to an
> object and then run a big sequence of chained calls. In some cases, the
> tango way has something going for it, but in others, Just get the ___
> out of my way and put "bla bla bla" on the screen. I don't care if it's
> less flexible, because I just want to print.

How on earth is

Cout("somestring"); more "complex" than writef (write actually)?

You can use chained calls with Tango, but you don't have to, and generally
you won't. So Tango is probably both flexible _and_ able to do just do what
you want?

> 
> This may be a bit overreacting but it's similar for Phobos's streams and
> whatever Tango has. Last time I had time to try to learn tango's IO, I
> spent about 2 hours trying to get my head around how the heck it worked
> and still I couldn't figure it out (this might have been a side effect
> of me trying to get a 500 ft. overview of how the whole thing works and
> not just a cookbook do ABC to get XYZ understanding). In Phobos, there
> are streams, you can read from them with a few dozen methods and write
> to them with about the same. Everything you need to know you can get in
> about 5 screens of web page that is mostly a list of nearly identical
> functions.

Tango's IO system is indeed flexible, and to some complex to learn. With the
fairly new stream abstractions, it should be no more difficult than Phobos'
though, and indeed, in Tango they are integrated such that you can chain
streams using them as filters and more.

> 
> 
>> 
>>>I know you are already working on stand-alone functions in Tango,
>>>and it's a good thing to do, IMHO. :)
>> 
>> 
>> It is not as if such functions are non-existant in Tango, so which exact
>> functionality do you think is better expressed through free standing
>> functions rather than objects? The answers of others shows that this
>> usually is wanted for objects where you often need only one operation on
>> the given object, even if others are available. This don't remove the
>> fact that an object (class) equally often is a useful abstraction, and
>> when that is established, free standing functions usually should be
>> implemented as wrappers around each method on the object, rather than the
>> object being implemented via free standing functions. This is why Tango
>> looks as it does today; we have avoided wrappers of our own code if
>> possible, because they degrade orthogonality of the API, and add more
>> code to maintain. Whether we have been to strict in enforcing that
>> stance, is an open question.
>> 
> 
> Where the "OO is god" (oops, make that "good") stance puts me off is
> where it get in my way with things like (random example) RegEx. I don't
> want to new of an object and fill in all the members (etc, etc) just to
> run one regex match and then drop the object. I'd love to have both a
> RegEx class then compiles to some sort of fast state machine and a free
> function that does an on the fly interpretation.

I highly doubt this is a good example from Tango considering Tango and
Phobos currently share Regex implementation?

> I know that's all a bit disjointed, but I hope it shows something of my
> reservations of switching to Tango.

It mostly shows that you are making decisions on an uninformed and outdated
basis :)

-- 
Lars Ivar Igesund
blog at http://larsivi.net
DSource, #d.tango & #D: larsivi
Dancing the Tango



More information about the Digitalmars-d mailing list