questions on PhanTango 'merger' (was Merging Tangobos into Tango) - long-term vision
BCS
BCS at pathlink.com
Wed Oct 10 14:30:43 PDT 2007
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.
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.
>
>>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.
Before you even say it; That is a totally impractical way to do it. Why
have two totally independent code bases doing (almost) exactly the same
thing? At this point I'm just stating what I think would be ideal, not
what I expect to get.
I know that's all a bit disjointed, but I hope it shows something of my
reservations of switching to Tango.
>
>>Regards, Frank
>
>
More information about the Digitalmars-d
mailing list