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

Kris foo at bar.com
Wed Oct 10 22:02:04 PDT 2007


Nice! Thanks for this. Some comments inline:


"Bill Baxter" <dnewsgroup at billbaxter.com> wrote in message 
news:fek90r$2e9o$1 at digitalmars.com...
> Kris wrote:
>> "0ffh" <spam at frankhirsch.net> wrote in message 
>> news:fej1ad$30el$1 at digitalmars.com...
>>> 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.
>>> I know you are already working on stand-alone functions in Tango,
>>> and it's a good thing to do, IMHO. :)
>>>
>>> Regards, Frank
>>
>>
>> Thanks, Frank. If you could be specific about some of those, it would 
>> help notably ... can you provide an example or two, please?
>
> Ideally, tango would just be a library I could import like any other. But 
> assuming that's not going to happen, here's what I think could make the 
> schism easier to deal with.
>
> *** Convenience functions ***
>
> Here's a list of things I actually use frequently in phobos, ordered 
> roughly by frequency of use:
>
> std.stdio : writef,writefln
> std.string : format
> std.math
> std.conv
> std.regexp
> std.path
> std.stream : BufferedFile
> std.file : exists,isFile,isDir
>
> If there were equivalently easy-to-use versions of those in Tango, that 
> would cover my uses.  And maybe there are already for some, but i see for 
> example that std.path is replaced by a cumbersome OO interface, and

the OO of this particular item is very often much cheaper regarding the heap 
(which is why it is OO), and it has changed quite a bit recently. I just 
wish we had struct ctors in D v1 ...


> std.conv has no recommended equivalent.
> [http://www.dsource.org/projects/tango/wiki/PhobosTangoMigration]

Unfortunately, that page is woefully out of date :(

I'll just touch briefly on some the packages you mentioned:

- tango.math is all free-function, I think?
- regexp is no different than phobos that I know of
- I'd imagine std.conv is handled by the (free-function) modules in 
tango.text.convert ?
- the equivalent of a 'format' function is probably covered by 
tango.text.convert.Format module

>
> Anyway, to use anything beyond those few up there (and even some of those) 
> I have to look up what the API is on the web page.
>
> BUT one advantage of Phobos there, is that I can find anything I need 
> pretty quickly with that list of modules on the left hand side of the 
> Phobos page.

agreed


>
> *** Better API documentation ***
>
> In contrast, the closest thing with Tango seems to be the Tango API Index 
> (http://www.dsource.org/projects/tango/docs/current/) which has a huge 
> list of names of everything in Tango, much of which is implementation 
> detail users shouldn't be mucking with.   So it's hard to find the thing 
> you're looking for if you just want to know how to open a file.

Very good point. There's something in the works to address that specific 
issue.


> I think a simplified module index that omits things users won't generally 
> need would help on that front.  And a one-line description next to each 
> link wouldn't hurt either.  Topical groupings might help too.  Like have a 
> list of every module related to "Text Processing" "Networking".  The 
> categories in the reference manual might be a good place to start.

Yes; topical groupings (perhaps by package) would be much better. In tango, 
each package tends to address a specific need, so that might work out.

>
> Another Tango doc gripe is that the modules don't have any useful 
> module-level descriptions.  Look at phobos' std.conv for comparison: 
> http://www.digitalmars.com/d/1.0/phobos/std_conv.html
> The page starts off with a useful description of what std.conv is for. 
> Given that, I can quickly tell if std.conv is the right module for the job 
> or not (as in it provides atoi and atol type conversions, rather than 
> being a module for doing temperature conversions or image convolutions or 
> something).  Other modules in Phobos are even better, like std.boxer, 
> giving both a quick overview *and* a few basic usage examples.

Another solid point

>
> *** Easier switching back and forth ***
>
> It seems that installing Tango itself is pretty easy now, at least if

Is this linux? I think Win32 has certainly been easy for a long time, but 
the linux packaging has never had a true 'installer' or whatever since 
nobody in the linux world can agree on what that should be :)

Any suggestions there?

> you have dsss installed, but AFAIK that renders all your phobos-based libs 
> useless.  Tango should do two things to make switching back and forth 
> easier.
> 1) Tanogobos should be a part of the default install

That may happen, if we can avoid the maintenance concerns

> 2) A solution for tango-phobos switching should be installed by default. I 
> don't care how it's done but I think it should come in two flavors:
>   a) a per-shell transient method for changing the default
>   b) a global per-installation (or per-user if there's some way to get 
> that) method.

Aye


>
> As someone who still has a lot of code written that depends on Phobos, I 
> want to know that I can go back and forth between Phobos and Tango easily. 
> Right now if I want to install Tango and still use Phobos occasionally, I 
> have to choose between three different fiddly techniques 
> (http://www.dsource.org/projects/tango/wiki/PhobosTangoCooperation). The 
> web page gives no reason to prefer one method over another, so that means 
> I have to read all three and understand how they work well enough to 
> determine which method is the best for me.  Something like this should 
> just happen automatically as a part of installing Tango.

That would be great!

>
> If I'm going to write a library that depends on Tango, I want to be able 
> to say to potential users that all they have to do to use it is:
>
> """
>    1) Install tango (dsss net install tango).
>    2) Type the command "set_dlibrary tango"[*] at a command prompt.
> and later
>    3) if you need to go back to Phobos type "set_dlibrary phobos"[*]
>
> [*] To make the switch persistent use "set_dlibrary -p"
> """

We need a volunteer to write this <g>


>
> Achieving this level of simplicity probably requires some cooperation from 
> Walter.  But it seems utterly attainable.  Unlike merging the runtimes.

All good and valid points, and taken note of. Thanks for making the effort 





More information about the Digitalmars-d mailing list