www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: Polishing D - suggestions and comments

reply Daniel <murpsoft hotmail.com> writes:
Jarrod Wrote:

 On Sun, 20 Jan 2008 21:32:45 -0800, Walter Bright wrote:
 
 Thanks for taking the time to write this. I think your suggestions are
 very good.

I think I should ask you here since it's in context with the Phobos suggestions. What are you planning to do with Tango? Personally I prefer the Phobos API for it's naming, organisation and documentation, but I also like the extra features tango adds and of course I don't want to say no to a faster garbage collector and less bugs, which leaves me torn. Perhaps it might be time to replace Phobos, or (even better) officially merge the two libraries? Better now than later.

Walter is, and ought to be, focusing his efforts on the language more than the libraries. Oddly, I would argue that all libraries are simply stop-gap fixes for missing or poorly implemented language features; indeed most programming code tends to be. However, D has phobos, there was mango, now tango, and work has been done on a tangobos. The fact that the library keeps changing shows that D's language features actually have an impact, as they frequently replace or integrate library features. Regards, Dan
Jan 23 2008
next sibling parent reply Jarrod <qwerty ytre.wq> writes:
On Wed, 23 Jan 2008 21:52:19 -0500, Daniel wrote:

 Walter is, and ought to be, focusing his efforts on the language more
 than the libraries.
 
 Oddly, I would argue that all libraries are simply stop-gap fixes for
 missing or poorly implemented language features; indeed most programming
 code tends to be.
 
 However, D has phobos, there was mango, now tango, and work has been
 done on a tangobos.  The fact that the library keeps changing shows that
 D's language features actually have an impact, as they frequently
 replace or integrate library features.
 
 Regards,
 Dan

To claim Phobos is not a part of D is to claim the C stdlib is not a part of C. Phobos is a part of D, and it's a very important part of D too (hell we can't even have classes without Object.d). Walter is the father of Phobos and although he allows others to contribute to it, he is the one who decides what to add to Phobos and how to add it. Yes, Walter should focus on developing the language of course, but he also has to decide what the *standard* library is going to be since he is after all the head project manager of both Phobos and D. I emphasize the word *standard* because right now, we don't have a standard. Unless you include a bunch of versioning/mixin hacks, we currently have code that won't even compile on different workstations because of two very different core libraries that are totally incompatible. So now we're stuck with an annoying rift. Tangobos is a step in the right direction to get compatibility back, but at the moment it's just a band-aid solution. All I want to see is a standard, be it Phobos with all the cool stuff Tango adds, or a Tango with all the nice things Phobos has. But this isn't going to happen unless one of the dev teams concedes already :|
Jan 24 2008
next sibling parent reply Lars Ivar Igesund <larsivar igesund.net> writes:
Jarrod wrote:

 On Wed, 23 Jan 2008 21:52:19 -0500, Daniel wrote:
 
 Walter is, and ought to be, focusing his efforts on the language more
 than the libraries.
 
 Oddly, I would argue that all libraries are simply stop-gap fixes for
 missing or poorly implemented language features; indeed most programming
 code tends to be.
 
 However, D has phobos, there was mango, now tango, and work has been
 done on a tangobos.  The fact that the library keeps changing shows that
 D's language features actually have an impact, as they frequently
 replace or integrate library features.
 
 Regards,
 Dan

To claim Phobos is not a part of D is to claim the C stdlib is not a part of C. Phobos is a part of D, and it's a very important part of D too (hell we can't even have classes without Object.d). Walter is the father of Phobos and although he allows others to contribute to it, he is the one who decides what to add to Phobos and how to add it. Yes, Walter should focus on developing the language of course, but he also has to decide what the *standard* library is going to be since he is after all the head project manager of both Phobos and D. I emphasize the word *standard* because right now, we don't have a standard. Unless you include a bunch of versioning/mixin hacks, we currently have code that won't even compile on different workstations because of two very different core libraries that are totally incompatible. So now we're stuck with an annoying rift. Tangobos is a step in the right direction to get compatibility back, but at the moment it's just a band-aid solution. All I want to see is a standard, be it Phobos with all the cool stuff Tango adds, or a Tango with all the nice things Phobos has. But this isn't going to happen unless one of the dev teams concedes already :|

More curiosity from me, what in Phobos do you consider cool, and at the same time miss in Tango? -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Jan 25 2008
parent Lars Ivar Igesund <larsivar igesund.net> writes:
Jarrod wrote:

 On Fri, 25 Jan 2008 19:01:26 +0100, Lars Ivar Igesund wrote:
 
 More curiosity from me, what in Phobos do you consider cool, and at the
 same time miss in Tango?

Cool phobos stuff: toString. 'Nuff said.

? Tango has toString too.
 toStringz is also much easier to find. I had to follow a bug report under
 trac that I found with the search feature, just to find the same thing in
 Tango.

It is indeed considered a C compatibility routine which may make it harder to find. This particular case is due to a wish to keep C out of the main portions of the Tango user API which we try to keep to D as much as possible. It is still avaialable through the stdc package though.
 
 In Phobos the API layout and naming conventions 'feel' more right to me.
 If I need something solved with the library, I can generally find it
 quickly and easily because of its obvious naming, then just look up the
 documentation and within a few minutes I have a solution.
 On the other hand Tango made me fiddle around a bit. A lot of API felt
 unfamiliar to me for some reason (perhaps my heavy C background?), and
 the documentation doesn't seem as clean. For example, just to find out
 how to add a pointer to the garbage collector made me have to search the
 trac just to find it. In Phobos it was pretty much instantly apparent.
 'std.gc'. I mean it's so apparent I can recall it off the top of my head,
 and it's not like I've used it more than the tango one which I can't at
 all recall the location of without looking it up (I remember it was an
 object called GC though if that's a consolation, but I only remember that
 because I aliased stc.gc to GC so as to have minimum versioning issues)

Yes, the Tango API docs could be much better organized, and we know this. This is made a much more important facet of your problems above due to Tango having rather much more functionality, thus needing more modules. In addition we find it important to keep interdependencies low where possible, leading to some additional modules.
 Oh, and the Phobos libs don't have leading Capitol Letters and oh man I
 don't really like that in Tango.

Ignoring this :)
 On the other foot, things I want from Tango:
 Better threading, the fixed bugs, the text modules, the faster GC, all
 the useful extras like signals and etc are all really handy and useful.
 So in short, "stuff".
 
 Tangobos is pretty much my answer for now I guess, but I'd prefer a
 proper merge rather than having the two libraries just slapped together
 (okay I'm not trying to be mean here, it's not like Tangobos was a 5
 minute hack and I know that, but you get the point).

I think I addressed this in my other post (the stuff about merging).
 
 Well, hope that sates some of your curiosity.
 But odds are you probably have questions for some of my answers now. :>

No, I don't think I have :) Thank you very much for your feedback. I'd wish I didn't have to pull it out of you though ;) -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Jan 26 2008
prev sibling next sibling parent reply Sean Kelly <sean f4.ca> writes:
Jarrod wrote:
 On Wed, 23 Jan 2008 21:52:19 -0500, Daniel wrote:
 
 Walter is, and ought to be, focusing his efforts on the language more
 than the libraries.

 Oddly, I would argue that all libraries are simply stop-gap fixes for
 missing or poorly implemented language features; indeed most programming
 code tends to be.

 However, D has phobos, there was mango, now tango, and work has been
 done on a tangobos.  The fact that the library keeps changing shows that
 D's language features actually have an impact, as they frequently
 replace or integrate library features.

 Regards,
 Dan

To claim Phobos is not a part of D is to claim the C stdlib is not a part of C.

Walter has said very explicitly on a number of occasions that he doesn't like that the C and C++ language spec includes the library spec. In fact, I'm pretty sure this is the reason the Phobos documentation is separated from the language documentation. That isn't to say that there is no value in a language having a specific standard library, but I think it's somewhat of a different issue from that of them being defined in the same spec.
 Phobos is a part of D, and it's a very important part of D too (hell we 
 can't even have classes without Object.d). Walter is the father of Phobos 
 and although he allows others to contribute to it, he is the one who 
 decides what to add to Phobos and how to add it. Yes, Walter should focus 
 on developing the language of course, but he also has to decide what the 
 *standard* library is going to be since he is after all the head project 
 manager of both Phobos and D.

I think one of the arguments for having the library spec exist separate from the language spec is to provide a division of labor. The C++ committee has a number of sub-committees dedicated to different areas, but each change still needs to be voted on by the whole group. I certainly can't claim to speak for Walter, but were I in his place I'd prefer to be in an advisory position for the library rather than the principal maintainer. It seems that things are moving a bit in that direction with Andrei and Brad working on Phobos as well, but Walter still has the appearance of being the go-to man for everything related to D, which is a huge responsibility in terms of the time commitment required.
 All I want to see is a standard, be it Phobos with all the cool stuff 
 Tango adds, or a Tango with all the nice things Phobos has.

Personally, I don't think a standard library must have every bell and whistle. Rather, I'd like it to provide enough of a programming framework that libraries which follow the framework are likely to work together very well, and for it to provide the most commonly used features so I don't have to go searching for a third-party library for every day stuff. The C++ standard library does a decent job of this with its iterators and algorithms, but it leaves too many holes in other areas. No one seems to be terribly fond of iostreams, for example, and the design is difficult to adapt to more complex needs. Sean
Jan 25 2008
parent Lars Ivar Igesund <larsivar igesund.net> writes:
Jarrod wrote:

 A merge could get the Tango team to work with Phobos too, so everyone can
 help it advance. Hey, it worked real well for compiz and beryl.

There are two aspects about Tango, the runtime and the user level API. It would indeed be beneficial if the first could be compatible with the one in Phobos, and we still hope to achieve that in some sense. As for the user API, that is what most people see, and what garners the most opinions. I don't think it will be particularly useful to merge that with Phobos, although they can be shipped together (as is done with the Tangobos bundles). Even though Phobos and Tango then can be used at the same time, that doesn't really make much sense unless you are forced that way by your library dependencies. If you use one part of Tango, you are likely to find good complimentary functionality elsewhere in Tango rather than in Phobos, and probably vice versa. As for working together, that is a possibility with the runtime, but considering we have rather different opinions on how to shape the library, it is very unlikely for user library, at least across the board. There are some minor parts that are fairly close to each other, and where fixes or improvements may be applied to both. -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Jan 26 2008
prev sibling next sibling parent Jarrod <qwerty ytre.wq> writes:
On Fri, 25 Jan 2008 19:01:26 +0100, Lars Ivar Igesund wrote:

 More curiosity from me, what in Phobos do you consider cool, and at the
 same time miss in Tango?

Cool phobos stuff: toString. 'Nuff said. toStringz is also much easier to find. I had to follow a bug report under trac that I found with the search feature, just to find the same thing in Tango. In Phobos the API layout and naming conventions 'feel' more right to me. If I need something solved with the library, I can generally find it quickly and easily because of its obvious naming, then just look up the documentation and within a few minutes I have a solution. On the other hand Tango made me fiddle around a bit. A lot of API felt unfamiliar to me for some reason (perhaps my heavy C background?), and the documentation doesn't seem as clean. For example, just to find out how to add a pointer to the garbage collector made me have to search the trac just to find it. In Phobos it was pretty much instantly apparent. 'std.gc'. I mean it's so apparent I can recall it off the top of my head, and it's not like I've used it more than the tango one which I can't at all recall the location of without looking it up (I remember it was an object called GC though if that's a consolation, but I only remember that because I aliased stc.gc to GC so as to have minimum versioning issues) Oh, and the Phobos libs don't have leading Capitol Letters and oh man I don't really like that in Tango. On the other foot, things I want from Tango: Better threading, the fixed bugs, the text modules, the faster GC, all the useful extras like signals and etc are all really handy and useful. So in short, "stuff". Tangobos is pretty much my answer for now I guess, but I'd prefer a proper merge rather than having the two libraries just slapped together (okay I'm not trying to be mean here, it's not like Tangobos was a 5 minute hack and I know that, but you get the point). Well, hope that sates some of your curiosity. But odds are you probably have questions for some of my answers now. :>
Jan 26 2008
prev sibling next sibling parent reply Jarrod <qwerty ytre.wq> writes:
Well okay, valid points there and I never really said the opposite. But 
Walter does in the end decide what Phobos is, and he will be "The Guy" 
who decides to incorporate/replace/ignore the tango effort.
So it makes sense to appeal to him for this issue.


 Personally, I don't think a standard library must have every bell and
 whistle.

Indeed, but surely you can't ignore many of the numerous advancements of tango and shrug them off as 'extra bells and whistles.' What bugs me overall is not the rift between features on either side, but rather the incompatibility issues. Unless there is a merge, there will be two standards.. Which is clearly an oxymoron. A merge could get the Tango team to work with Phobos too, so everyone can help it advance. Hey, it worked real well for compiz and beryl.
Jan 26 2008
parent "Kris" <foo bar.com> writes:
"Jarrod" <qwerty ytre.wq> wrote in message 
news:fnfa1t$1o1g$2 digitalmars.com...

 What bugs me overall is not the rift between features on either side, but
 rather the incompatibility issues. Unless there is a merge, there will be
 two standards..

Jarrod: In what manner does Tangobos not provide the "merge" you describe? It permits you to import, compile and link both phobos and Tango modules without fuss (which is what people had asked for). If you have a different idea of what that "merge" should instead be, would you please clarify?
Jan 26 2008
prev sibling parent reply Jarrod <qwerty ytre.wq> writes:
On Sat, 26 Jan 2008 19:24:13 +0100, Lars Ivar Igesund wrote:

 Jarrod wrote:
 
 A merge could get the Tango team to work with Phobos too, so everyone
 can help it advance. Hey, it worked real well for compiz and beryl.

There are two aspects about Tango, the runtime and the user level API. It would indeed be beneficial if the first could be compatible with the one in Phobos, and we still hope to achieve that in some sense. As for the user API, that is what most people see, and what garners the most opinions. I don't think it will be particularly useful to merge that with Phobos, although they can be shipped together (as is done with the Tangobos bundles). Even though Phobos and Tango then can be used at the same time, that doesn't really make much sense unless you are forced that way by your library dependencies. If you use one part of Tango, you are likely to find good complimentary functionality elsewhere in Tango rather than in Phobos, and probably vice versa. As for working together, that is a possibility with the runtime, but considering we have rather different opinions on how to shape the library, it is very unlikely for user library, at least across the board. There are some minor parts that are fairly close to each other, and where fixes or improvements may be applied to both.

Okay I get it, Tango seems to have been made because some people didn't like the Phobos API, not because it lacked features. But in the end a lot of people choose Tango because of its features and better runtime. Not trying to rub a lemon in your eye here or anything and hey I could be very wrong on this, but maybe different API wasn't what most people needed? Besides, if you merged couldn't you make a deal? Convince Walter to perhaps change or add a few API in Phobos to the 'better' Tango ones as you see them? Oh and because I'm too lazy to reply to your other post directly :P Regarding toString: Yes Tango has toString but iirc you have to import each library for the datatype that you want to convert from, don't you? Not so good in template functions. All you need from Phobos is str.toString.
Jan 26 2008
parent "Kris" <foo bar.com> writes:
"Jarrod" <qwerty ytre.wq> wrote in message 
news:fnge6e$1eto$1 digitalmars.com...
 On Sat, 26 Jan 2008 19:24:13 +0100, Lars Ivar Igesund wrote:

 Jarrod wrote:

 A merge could get the Tango team to work with Phobos too, so everyone
 can help it advance. Hey, it worked real well for compiz and beryl.

There are two aspects about Tango, the runtime and the user level API. It would indeed be beneficial if the first could be compatible with the one in Phobos, and we still hope to achieve that in some sense. As for the user API, that is what most people see, and what garners the most opinions. I don't think it will be particularly useful to merge that with Phobos, although they can be shipped together (as is done with the Tangobos bundles). Even though Phobos and Tango then can be used at the same time, that doesn't really make much sense unless you are forced that way by your library dependencies. If you use one part of Tango, you are likely to find good complimentary functionality elsewhere in Tango rather than in Phobos, and probably vice versa. As for working together, that is a possibility with the runtime, but considering we have rather different opinions on how to shape the library, it is very unlikely for user library, at least across the board. There are some minor parts that are fairly close to each other, and where fixes or improvements may be applied to both.

Okay I get it, Tango seems to have been made because some people didn't like the Phobos API, not because it lacked features. But in the end a lot of people choose Tango because of its features and better runtime. Not trying to rub a lemon in your eye here or anything and hey I could be very wrong on this, but maybe different API wasn't what most people needed?

There's a lot of history behind this, so it's understandable that many newer folks won't know the story. You might take a look at the Ares forum on dsource to get a broader picture, but it boils down to one fact: phobos was going nowhere - patches were being sent to walter and not being applied for over a year, etc. Not to mention that it was, at the time most would agree, a bit of a design mish-mash. A variety of folks felt that Walter should not be burdened with the library, when it was abundantly clear his focus and priority was the language instead. The upshot was something "owned", guided, driven and maintained by the community instead. To suggest that was borne of merely a dislike for an API is like saying D exists simply because Walter doesn't like Bjarne's haircut.
 Besides, if you merged couldn't you make a deal? Convince Walter to
 perhaps change or add a few API in Phobos to the 'better' Tango ones as
 you see them?


 Oh and because I'm too lazy to reply to your other post directly :P
 Regarding toString: Yes Tango has toString but iirc you have to import
 each library for the datatype that you want to convert from, don't you?
 Not so good in template functions. All you need from Phobos is
 str.toString.

Where phobos is monolithic, Tango is modular. There's a price to pay for that, in that modularity can sometimes require an extra import. While this is hardly an impediment, you could happily import tango.util.Convert instead, and exchange modularity for triviality. This is a general philosophy within Tango - keep things modular, and provide a wrapper on top for those who prefer that instead. It's more work to design and build a library that way (often much more), but it's worth it to many folks.
Jan 26 2008
prev sibling parent reply Lars Ivar Igesund <larsivar igesund.net> writes:
Daniel wrote:

 Jarrod Wrote:
 
 On Sun, 20 Jan 2008 21:32:45 -0800, Walter Bright wrote:
 
 Thanks for taking the time to write this. I think your suggestions are
 very good.

I think I should ask you here since it's in context with the Phobos suggestions. What are you planning to do with Tango? Personally I prefer the Phobos API for it's naming, organisation and documentation, but I also like the extra features tango adds and of course I don't want to say no to a faster garbage collector and less bugs, which leaves me torn. Perhaps it might be time to replace Phobos, or (even better) officially merge the two libraries? Better now than later.

Walter is, and ought to be, focusing his efforts on the language more than the libraries. Oddly, I would argue that all libraries are simply stop-gap fixes for missing or poorly implemented language features; indeed most programming code tends to be. However, D has phobos, there was mango, now tango, and work has been done on a tangobos. The fact that the library keeps changing shows that D's language features actually have an impact, as they frequently replace or integrate library features.

Mango doesn't fit into the equation as it never was meant to do what Tango is doing, it just happened to have functionality that fit better in Tango. As for Tangobos, it is just a version of Phobos that is made to work (as much as possible) with the runtime in Tango. -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Jan 25 2008
parent Sean Kelly <sean f4.ca> writes:
Lars Ivar Igesund wrote:
 Daniel wrote:
 
 Jarrod Wrote:

 On Sun, 20 Jan 2008 21:32:45 -0800, Walter Bright wrote:

 Thanks for taking the time to write this. I think your suggestions are
 very good.

Phobos suggestions. What are you planning to do with Tango? Personally I prefer the Phobos API for it's naming, organisation and documentation, but I also like the extra features tango adds and of course I don't want to say no to a faster garbage collector and less bugs, which leaves me torn. Perhaps it might be time to replace Phobos, or (even better) officially merge the two libraries? Better now than later.

the libraries. Oddly, I would argue that all libraries are simply stop-gap fixes for missing or poorly implemented language features; indeed most programming code tends to be. However, D has phobos, there was mango, now tango, and work has been done on a tangobos. The fact that the library keeps changing shows that D's language features actually have an impact, as they frequently replace or integrate library features.

Mango doesn't fit into the equation as it never was meant to do what Tango is doing, it just happened to have functionality that fit better in Tango. As for Tangobos, it is just a version of Phobos that is made to work (as much as possible) with the runtime in Tango.

It's perhaps worth noting that 99% of the code in Tangobos is identical to Phobos. std.thread is one of only a few modules with any changes whatsoever, and probably the only module with any user-visible changes. Sean
Jan 25 2008