February 07, 2008 Re: Standard Library Concerns (Phobos / Tango) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alexander Panek | Alexander Panek Wrote:
> Michel Fortin wrote:
> > I haven't used Tango that much, but each time I look at it it takes much more time to find what I need than with Phobos. With Phobos, I generally open the std folder, glance at the file, pick the one that looks like it has what I need, and find what I want in it (most of the time). In tango, this is much more difficult unless you are already familiar with the layout of the library.
>
> There is a book about D+Tango, and it's really a good reference. Apart from that, the online documentation is being worked on. It's not so easy to keep the documentation up-to-date by automated ddoc generation while putting it in a reasonable format right now. That's a lack that is known. If you have any ideas how to improve it, they are very welcome.
>
> > Case in point: tango.stdc.stringz; why does that deserve its own module?
>
> Because you just need that functions, sometimes, without anything else from tango.stdc .
>
> > There are so much tiny modules in Tango that I find it difficult to find what I want.
>
> That's true. The tango.group packages try to address this. Have you looked at them yet? Maybe you can come up with something you'd need additionally?
>
> > Still tango.stdc.stringz, I wonder why the function to convert to a D string is called fromStringz... I can understand the function's name, but it just seem silly to not call it toString and take advantage of function overloading. In this case I find Phobos approach better: string functions are concentrated in one easy-to-find place.
>
> It's not always ideal to have everything in one place. Contextual
> grouping (tango.group) in combination with selective modules is probably
> better - besides actually /using/ D's namespace/module features.
>
> > In
> > Tango, you have tango.stdc.stringz, then you have tango.text.convert.<insert your type here>, then you have tango.text.Text, tango.text.Ascii, tango.text.Util and so on. Anyone can guess where the replace function is (within the last three) without looking in each module separately?
> >
> > Answer: it's in tango.text.Util; tango.text.Text doesn't deal with D strings, it's the home of the Text class (with also has a replace function, although not the one I was searching for) and tango.text.Ascii holds (as one would expect) functions (only four!) relating to character case which are restricted to ASCII domain.
>
> Where would you put or expected it?
>
> > There are also a few stylistic things I don't like about tango: character case for abbreviations for instance (Ascii instead of ASCII?) and the uppercase module names.
>
> It's a one convention that was chosen in an early stage - one of many, where none fits everyone perfectly.
These pains, module-code-separation and documentation can easily be eased with intellisense/intellihelp in a decent IDE.
Need the code of a tango (or whatever) object or function?: right click on any expression and select go to definition.
Need help on a tango (or whatever) object or function?: showing tooltip/dynapic help generated from ddoc-comment in source as you type, or by pressing ctrl-space (whatever), showing method, parameter, return info, including overloads...
If this will be possible who will care about how many files contain string functions?
ElfQT
|
February 07, 2008 Re: Standard Library Concerns (Phobos / Tango) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dan | Dan wrote:
> The *only* reason I'd consider switching to tango is if the compiled algorithms were *noticeably* faster
IO _is_ noticeably faster in Tango. If I didn't need to learn ML over th next 23 hours, I'd slap together a couple tests.
|
February 07, 2008 Re: Standard Library Concerns (Phobos / Tango) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Michel Fortin | Michel Fortin wrote:
> Personally, I'd prefer to see Phobos kept as the standard library and improved technically to the level Tango is at now.
Not to start another pointless style debate, but there's a particular reason the Java style guide (among others) suggests not capitalizing well-known abbreviations - it improves readability. After all, would you rather see XmlHttpRequest or XMLHTTPRequest?
|
February 07, 2008 Re: Standard Library Concerns (Phobos / Tango) | ||||
---|---|---|---|---|
| ||||
Posted in reply to ElfQT | ElfQT wrote:
> These pains, module-code-separation and documentation can easily be eased with intellisense/intellihelp in a decent IDE.
> Need the code of a tango (or whatever) object or function?: right click on any expression and select go to definition.
> Need help on a tango (or whatever) object or function?: showing tooltip/dynapic help generated from ddoc-comment in source as you type, or by pressing ctrl-space (whatever), showing method, parameter, return info, including overloads...
>
> If this will be possible who will care about how many files contain string functions?
>
> ElfQT
It's very possible; all the stuff you mentioned is in Descent. Control-click for go-to definition and hover over a function or type to see it's (formatted) Ddoc.
|
February 07, 2008 Re: Standard Library Concerns (Phobos / Tango) | ||||
---|---|---|---|---|
| ||||
Posted in reply to ElfQT | On Thu, 07 Feb 2008 11:48:36 -0500, ElfQT wrote:
>
> These pains, module-code-separation and documentation can easily be eased with intellisense/intellihelp in a decent IDE. Need the code of a tango (or whatever) object or function?: right click on any expression and select go to definition. Need help on a tango (or whatever) object or function?: showing tooltip/dynapic help generated from ddoc-comment in source as you type, or by pressing ctrl-space (whatever), showing method, parameter, return info, including overloads...
>
> If this will be possible who will care about how many files contain string functions?
>
> ElfQT
I think the point was it is harder to find what you want in the documentation, not the finding what to import. ie a what do I need search versus a where is this search.
|
February 07, 2008 Re: Standard Library Concerns (Phobos / Tango) | ||||
---|---|---|---|---|
| ||||
Posted in reply to ElfQT | ElfQT Wrote: >> These pains, module-code-separation and documentation can easily be eased with intellisense/intellihelp in a decent IDE. Need the code of a tango (or whatever) object or function?: right click on any expression and select go to definition. >> >> Need help on a tango (or whatever) object or function?: showing tooltip/dynapic help generated from ddoc-comment in source as you type, or by pressing ctrl-space (whatever), showing method, parameter, return info, including overloads... >> >> If this will be possible who will care about how many files contain string functions? FWIW the Zeus IDE can be easily configured to do exactly this: http://www.zeusedit.com/forum/viewtopic.php?p=2543 |
February 07, 2008 Re: Standard Library Concerns (Phobos / Tango) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tim Burrell | "Tim Burrell" <tim@timburrell.net> wrote in message news:fochd0$30te$1@digitalmars.com... > Hey all, > > It seems that even though Phobos is open source, it's difficult for people to contribute to. Patch submissions aren't being accepted as readily as they should be, and bugs remain even months after having a fix submitted by users. > > Not to mention that it's confusing for new users to have to deal with two standard libraries. I think it would be a really good thing for the language as a whole if there were only one standard library. > > My personal opinion is that Walter should let go of Phobos and adopt Tango as the official standard library. I know there are people out there that prefer the Phobos API over Tango's, but I have a feeling that if Walter asked the Tango people to maintain the Tangobos base as the official standard library for D they would be okay with that. > > It would be a win-win situation for everyone, including Walter. His time would get to be spent more on D itself, as he would likely only need to oversee the standard library in terms of input regarding the API and patchset accepts. > > The community would gain a huge win because there would only be one unified standard library. > > Phobos users would still be able to use the Phobos API but would gain the benefits of using an API that they feel they can contribute to, and that has a proven track record of being responsive to fixing bugs. They'd also gain the ability to use the odd Tango class when desired. > > And Tango users wouldn't have to deal with using a non-standard library as the basis for their app, plus the ability to use the odd bit of the Phobos API would be nice now and again as well. > > I really feel strongly that a move toward a single standard library is the right thing to do for D. There's very few cons to such a move and a great many pros. > > Anyone else have any thoughts on the matter? > If we can get a systemm for accepting submitions to Phobos going, what if we made Tango a sort of expansion pack on top of it? I.E. Phobos addresses all the basic stuff, and Tango ditches all its standard library-ish code and becomes the "extended library" if you will. The way I see it the standard library should be fairly comprehensive without going in to actual nitches; that ought to be left to whatever expansion pack we put together. Thoughts? It's good to be back by the way; getting settled at college can take a while with classes and the like. > Tim. |
February 07, 2008 Re: Standard Library Concerns (Phobos / Tango) | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile | "bearophile" <bearophileHUGS@lycos.com> wrote in message news:fod8t8$1tf6$1@digitalmars.com... > dominik: >> khm :) http://www.digitalmars.com/d/2.0/phobos/std_bitmanip.html > > Can you explain me what you mean? I can't read your mind... sorry :) I like that! I use it extensively, and would like to see it in simillar form in tango, or bring in bitfields to D as a first class citizen. Also, while I'm at the numbers.. walter did AWHILE ago Bigint implementation for zortech I believe, wouldn't it be nice to make it a part of D, not library per se? Be ti simple BCD implementation, I don't care, but I care for BigInt. |
February 07, 2008 Re: Standard Library Concerns (Phobos / Tango) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ameer Armaly | Ameer Armaly wrote:
> If we can get a systemm for accepting submitions to Phobos going, what if we made Tango a sort of expansion pack on top of it? I.E. Phobos addresses all the basic stuff, and Tango ditches all its standard library-ish code and becomes the "extended library" if you will. The way I see it the standard library should be fairly comprehensive without going in to actual nitches; that ought to be left to whatever expansion pack we put together. Thoughts?
Not a bad idea! Personally I'd still like to see the Tango standard library stuff as the base -- IMO it's higher quality, and more complete.
That being said, what you suggested would be a great start, and could be enough to get Phobos where we need it to be. Either way, a system for getting more people involved with Phobos development would be really good.
The thing is, this is a huge part of the problem right now -- Phobos is currently closed, and isn't being maintained.
My original proposition of adopting Tango as the standard library of choice was resting on the assumption that Walter isn't really all that interested in giving Phobos the attention it deserves (which is fine!). If that's not true (also fine!), then what you suggest is definitely something I'd be okay with.
Unfortunately Walter hasn't weighed in on the subject, so it's hard to know what to believe.
Come on Walter, let's hear it! Speak up!
|
February 08, 2008 Re: Standard Library Concerns (Phobos / Tango) | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile | bearophile Wrote: > Sebastian Beschke: > > Which is pretty much the point of OO. The point of OO is to not know what you're doing? Maybe that's why I'm so averse. > > I agree, but the lesson here is probably that some people don't understand OO well, or they don't want to use it everywhere, or it doesn't go well with their mindset, or they need to go faster and they want to program in a more C-style, etc. It's the mindset, apparently. I have no preference for syntax. It's what's inside that counts IMHO, and with OO you have no idea what's inside. >Java has OOP only, but D allows other kinds of programming too, so maybe it may be better to not have a std lib that is fully OOP, so it can be used when you program differently (like functional-style). Tango doesn't need to be perfect for everyone, but probably there are ways to modify its structure enough to make it look good enough for most people :-) Agreed, but I'm continuing to use Phobos as long as it's better for me, and at the moment it still is. > I know very little about Tango still, but I have seen there are lot of people that think some changes may be in order before making it the D std lib :-) > > > If you want to understand something in Tango, you can still read the source code. Yes, if I want to understand anything in Tango, I need to study. I already understand Phobos because it's similar to what I already know. You say that Tango presents better GC and IO? I couldn't possibly allocate 16 consoles and iterate through them without an undefined number of cache misses - because I can't control where they exist. I couldn't possibly define classes and use copy-on-write semantics to expand them during runtime; something that was key to my thinking in the Walnut 2.x project. I couldn't possibly be informed about the memory footprint of my program, or understand how many mispredicted? branches are taken because of the possibly painful multiple-constructor system. I also cannot partially instantiate an object if I only need part of it for some rare case. I can keep going on the limitations of OO. But essentially the point is that unless it's beautiful inside, I don't care how convenient your notation is. If the insides on which your library is built is "don't look!" then I have trouble believing they're beautiful unless you have a whole slew (like, hundreds) of benchmarks to show me. Regards, Dan |
Copyright © 1999-2021 by the D Language Foundation