www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - D Conference Tango Phobos

reply BLS <nanali nospam-wanadoo.fr> writes:
Seems that nobody has the heart to ask . So I will :
Any clarification regarding having 2 standard libraries ?
Next how the upcoming DTL fits into this picture ?
Should we expect DTL Tango and DTL Phobos ?
Bjoern
Aug 26 2007
next sibling parent 0ffh <spam frankhirsch.net> writes:
BLS wrote:
 Should we expect DTL Tango and DTL Phobos ?
Dunno, but I suppose a template library can be made fairly independent of the stdlib. Regards, Frank
Aug 26 2007
prev sibling next sibling parent reply simax <simax gmx.net> writes:
BLS Wrote:

 Seems that nobody has the heart to ask . So I will :
 Any clarification regarding having 2 standard libraries ?
 Next how the upcoming DTL fits into this picture ?
 Should we expect DTL Tango and DTL Phobos ?
 Bjoern
Seem so that phobos developer and the tango developer are incompartible. IMO this is the biggest argument against D.
Sep 11 2007
parent reply Alexander Panek <alexander.panek brainsware.org> writes:
simax wrote:
 Seem so that phobos developer and the tango developer are incompartible. IMO
this is the biggest argument against D.
I don't think so. Since when is diversification a contra-argument?
Sep 12 2007
next sibling parent Mike Streatfield <dnewsgroup.c talyst.me.uk> writes:
Alexander Panek wrote:
 simax wrote:
 Seem so that phobos developer and the tango developer are 
 incompartible. IMO this is the biggest argument against D.
I don't think so. Since when is diversification a contra-argument?
Having two different, incompatibile, standard libraries makes integrating code between the two a pain, especially when it comes to using external libraries, for example. I suppose this might be mitigated by using static libraries but that's not really ideal in a lot of cases. For example you'll still have to deal with the fact that phobos objects use toString and tango objects toUtfX. Another argument I've seen is that by asking people to learn two different standard libraries, each with their own distinct design philosophy, you essentially make D two separate languages in terms of using components to perform common tasks. I suppose that also means that people unfamiliar with one or the other library can't help people with problems in the other as effectively.
Sep 12 2007
prev sibling parent reply renoX <renosky free.fr> writes:
Alexander Panek a écrit :
 simax wrote:
 Seem so that phobos developer and the tango developer are 
 incompatible. IMO this is the biggest argument against D.
I don't think so. Since when is diversification a contra-argument?
When it is a 'core' part, diversification is a real minus: looks for example at all these stupid string libraries in C++ when there wasn't any useful one in the standard library and how it did hurt C++ very deeply. So, the incompatibility of phobos/tango is definitely a minus: my boss would ask me, so which one will stay 'maintained'? And I would answer honestly: I don't know, one of them is probably going to die though because they're occupying the same 'niche'. So IMHO the sooner one dies or is made compatible with the other, the better it will be for D users. renoX
Sep 12 2007
parent reply "Janice Caron" <caron800 googlemail.com> writes:
On 9/12/07, renoX <renosky free.fr> wrote:

 So IMHO the sooner one dies or is made compatible with the other, the
 better it will be for D users.
So what you're saying is, it's VHS versus Betamax all over again! :-)
Sep 12 2007
parent reply simax <simax gmx.net> writes:
Janice Caron Wrote:

 On 9/12/07, renoX <renosky free.fr> wrote:
 
 So IMHO the sooner one dies or is made compatible with the other, the
 better it will be for D users.
So what you're saying is, it's VHS versus Betamax all over again! :-)
This is not the same problem and can't be compared. I like D and i would like to see it successful. But i think, the current situation without 'one' standard library can't be successful. I like the philosopy of phobos. (http://www.digitalmars.com/d/phobos/phobos.html) But i miss many functions. Tango is comprehensive and i like it too. I don't prefer any of this two libraries. But i can't use library X und Y together, because library X use phobos as base and library Y use tango as base. What can i do? I now use C, C++ and Java again. This is my situation and why i think this way (with two incompartible libraries) can't be successful. Many programming languages came out in the last 20 years, but only a few was successful. IMO a programming language without any comprehensive standard library can't be successful. (see http://www.tiobe.com/tpci.htm) The d developers in this news group daily discuss how to improve the d language. But the main problem is currently that we don't have one comprehensive and simple standard library. Many people sad me, this is the reason why they don't use D. What we need is: the main phobos and tango developer must sit together an find fast any compartible solution. But, what did these on the conference?
Sep 13 2007
next sibling parent reply Sean Kelly <sean f4.ca> writes:
simax wrote:
 
 What we need is: the main phobos and tango developer must sit together an find
fast any compartible solution.
 
 But, what did these on the conference?
We talked and agreed that the situation had to change, but since then most/all of us have been terribly busy. I won't have much time to work on Tango for another two weeks or so, and I suspect that I am not alone in this regard. So please have patience and trust that progress will be made, it may just be a while before this is evident. Sean
Sep 13 2007
parent reply simax <simax gmx.net> writes:
Sean Kelly Wrote:

 simax wrote:
 
 What we need is: the main phobos and tango developer must sit together an find
fast any compartible solution.
 
 But, what did these on the conference?
We talked and agreed that the situation had to change, but since then most/all of us have been terribly busy. I won't have much time to work on Tango for another two weeks or so, and I suspect that I am not alone in this regard. So please have patience and trust that progress will be made, it may just be a while before this is evident. Sean
Thank you for the clear statement. I am sure, many d developers have waiting for this. How can we help you?
Sep 14 2007
parent reply Sean Kelly <sean f4.ca> writes:
simax wrote:
 Sean Kelly Wrote:
 
 simax wrote:
 What we need is: the main phobos and tango developer must sit together an find
fast any compartible solution.

 But, what did these on the conference?
We talked and agreed that the situation had to change, but since then most/all of us have been terribly busy. I won't have much time to work on Tango for another two weeks or so, and I suspect that I am not alone in this regard. So please have patience and trust that progress will be made, it may just be a while before this is evident.
Thank you for the clear statement. I am sure, many d developers have waiting for this. How can we help you?
Well, the first issues to address are the few incompatibility points between Tango and Phobos within the runtime, the most visible being Object.toString in Phobos vs. Obejct.toUtf8 in Tango. This likely means toUtf8 in Tango will have to change to toString, so if anyone absolutely hates the idea, you're welcome to say so :-) However, I suspect there is a quiet majority using Phobos, so even valid arguments against the way it does things may have to be ignored if the change would break some user-visible portion of the Phobos library. Suggestions here are welcome also. Sean
Sep 14 2007
next sibling parent reply "Steven Schveighoffer" <schveiguy yahoo.com> writes:
"Sean Kelly" wrote
 Well, the first issues to address are the few incompatibility points 
 between Tango and Phobos within the runtime, the most visible being 
 Object.toString in Phobos vs. Obejct.toUtf8 in Tango.  This likely means 
 toUtf8 in Tango will have to change to toString, so if anyone absolutely 
 hates the idea, you're welcome to say so :-)
Can you just have both? i.e.: alias toUtf8 toString; Of course, one has to override only the real one in the classes, so I guess that becomes ambiguous as to which one is better. To me, I think toString is more clear. BTW, I think utf-8 has multi-byte characters. If that's the case, then isn't toASCII more appropriate?
 However, I suspect there is a quiet majority using Phobos
I used Phobos for about 4-5 days until I started wanting to use network sockets and select. Then I discovered that Phobos' support of it was rather lacking, and looked around and landed on tango. I like it much better. I think more people would use Tango if it was downloaded by default. Sort of like the Netscape vs. IE... BTW, I'm not saying phobos sucks, I'm just saying I prefer tango. Except for toUtf8 :) -Steve
Sep 14 2007
next sibling parent Sean Kelly <sean f4.ca> writes:
Steven Schveighoffer wrote:
 "Sean Kelly" wrote
 Well, the first issues to address are the few incompatibility points 
 between Tango and Phobos within the runtime, the most visible being 
 Object.toString in Phobos vs. Obejct.toUtf8 in Tango.  This likely means 
 toUtf8 in Tango will have to change to toString, so if anyone absolutely 
 hates the idea, you're welcome to say so :-)
Can you just have both? i.e.: alias toUtf8 toString; Of course, one has to override only the real one in the classes, so I guess that becomes ambiguous as to which one is better. To me, I think toString is more clear. BTW, I think utf-8 has multi-byte characters. If that's the case, then isn't toASCII more appropriate?
D uses utf-8 as the encoding format for char[] strings, which was the original reason for using toUtf8 in Tango--it specifies the encoding of the return data. toString doesn't specify an encoding so it's okay as well so long as the library doesn't contain a String class, and Tango does. So we'll likely have to rename it to something else.
 However, I suspect there is a quiet majority using Phobos
I used Phobos for about 4-5 days until I started wanting to use network sockets and select. Then I discovered that Phobos' support of it was rather lacking, and looked around and landed on tango. I like it much better. I think more people would use Tango if it was downloaded by default. Sort of like the Netscape vs. IE... BTW, I'm not saying phobos sucks, I'm just saying I prefer tango. Except for toUtf8 :)
I think a lot of people feel the same about toUtf8 :-) Personally, I like that it says exactly what will be returned and that it's a consistent name across the library for any point that returns a char[] string, including routines to convert between char[], wchar[], and dchar[] (which is done in std.utf in Phobos). But it's not easy to dislodge the opinion that the name is ugly. Sean
Sep 14 2007
prev sibling parent reply Regan Heath <regan netmail.co.nz> writes:
Steven Schveighoffer wrote:
 To me, I think toString is more clear.  BTW, I think utf-8 has multi-byte 
 characters.  If that's the case, then isn't toASCII more appropriate?
Are you saying that the object to<whatever> routine should output ASCII and not UTF-8, 16, or 32? If so, I doubt the japanese D community would agree. <g> Yes, UTF-8 characters are multi-byte characters but it also a superset of ASCII. As in, the ascii value of 'a' is the same in UTF-8 (and occupies a single byte). I prefer the name 'toString' over 'toUtf8'. I think that, given we have a 'string' type which is UTF-8, toString therefore implies UTF-8 also. Also, most of the standard library expects you to be using UTF-8 (which may or may not be a good thing) so it seems to be the standard/common/default D character type/format. That is despite the fact that many of the standard library routines use or convert to dchar to carry out their operations. Regan
Sep 14 2007
parent reply "Steven Schveighoffer" <schveiguy yahoo.com> writes:
"Regan Heath" <regan netmail.co.nz> wrote in message 
news:fce6je$1qe2$1 digitalmars.com...
 Steven Schveighoffer wrote:
 To me, I think toString is more clear.  BTW, I think utf-8 has multi-byte 
 characters.  If that's the case, then isn't toASCII more appropriate?
Are you saying that the object to<whatever> routine should output ASCII and not UTF-8, 16, or 32? If so, I doubt the japanese D community would agree. <g>
I understand, but first, I KNOW that in my objects that I override toUtf8, I'm outputting only ASCII. I'm not saying that all objects in the library do, but I'm guessing that many people do this. Then it becomes a question of how to interpret the fact that the name is toUtf8. Is it reasonable for a Japanese developer to assume that because his locale is set differently, all toUtf8 methods should return strings in Japanese, and to do otherwise is a bug? The name implies that to me, and so that is why I think it's misleading. It also implies that it is the responsibility of everyone who overrides that method to take care if i18n. Not something I wish to do when I'm probably only going to use toUtf8 as a debugging mechanism :) -Steve
Sep 14 2007
parent reply Regan Heath <regan netmail.co.nz> writes:
Steven Schveighoffer wrote:
 "Regan Heath" <regan netmail.co.nz> wrote in message 
 news:fce6je$1qe2$1 digitalmars.com...
 Steven Schveighoffer wrote:
 To me, I think toString is more clear.  BTW, I think utf-8 has multi-byte 
 characters.  If that's the case, then isn't toASCII more appropriate?
Are you saying that the object to<whatever> routine should output ASCII and not UTF-8, 16, or 32? If so, I doubt the japanese D community would agree. <g>
I understand, but first, I KNOW that in my objects that I override toUtf8, I'm outputting only ASCII.
And therefore UTF-8, or rather a subset of UTF-8 :)
 I'm not saying that all objects in the library 
 do, but I'm guessing that many people do this.
I would agree that most english speaking people, and even those languages whose special characters are included in the ASCII set will be doing this. But it's likely many Japanese people aren't (I'm not singling japanese out for any reason other than my own ignorance of which languages require more than the ASCII character set)
 Then it becomes a question of how to interpret the fact that the name is 
 toUtf8.  Is it reasonable for a Japanese developer to assume that because 
 his locale is set differently, all toUtf8 methods should return strings in 
 Japanese, and to do otherwise is a bug?  The name implies that to me, and so 
 that is why I think it's misleading.  It also implies that it is the 
 responsibility of everyone who overrides that method to take care if i18n. 
The good thing about UTF-8 is that it does not depend on locale. UTF-8 in one locale is identical to UTF-8 in another. It therefore does not imply any particular language either.
 Not something I wish to do when I'm probably only going to use toUtf8 as a 
 debugging mechanism :)
I can understand that, and that's the beauty of UTF-8, 16, and 32 they can all represent any character anyone could possibly want to use independant of locale or language. Regan
Sep 14 2007
parent reply "Steven Schveighoffer" <schveiguy yahoo.com> writes:
"Regan Heath" wrote
 Steven Schveighoffer wrote:
 The good thing about UTF-8 is that it does not depend on locale.  UTF-8 in 
 one locale is identical to UTF-8 in another.  It therefore does not imply 
 any particular language either.

 Not something I wish to do when I'm probably only going to use toUtf8 as 
 a debugging mechanism :)
I can understand that, and that's the beauty of UTF-8, 16, and 32 they can all represent any character anyone could possibly want to use independant of locale or language.
Thank you for the explanation, I totally understand now :) BTW, I still prefer toString :) Perhaps to clarify that toString is not returning a tango.text.String, maybe tango.text.String could be changed to tango.text.Utf8String? ;) I see myself using toUtf8 way more than using tango.text.String, so I'd rather have the annoyance there. -Steve
Sep 14 2007
next sibling parent reply Regan Heath <regan netmail.co.nz> writes:
Steven Schveighoffer wrote:
 "Regan Heath" wrote
 Steven Schveighoffer wrote:
 The good thing about UTF-8 is that it does not depend on locale.  UTF-8 in 
 one locale is identical to UTF-8 in another.  It therefore does not imply 
 any particular language either.

 Not something I wish to do when I'm probably only going to use toUtf8 as 
 a debugging mechanism :)
I can understand that, and that's the beauty of UTF-8, 16, and 32 they can all represent any character anyone could possibly want to use independant of locale or language.
Thank you for the explanation, I totally understand now :)
No problem. This is one of the things I love about the D news groups. When I first arrived I didn't know squat about Unicode, UTF-8, etc. Another D user, Arcane Jill, helped me understand. For anyone interested I rekcon wiki has a great explaination of the UTF encodings: http://en.wikipedia.org/wiki/UTF-8 http://en.wikipedia.org/wiki/UTF-16 http://en.wikipedia.org/wiki/UTF-32
 BTW, I still prefer toString :)
Same here.
 Perhaps to clarify that toString is not returning a tango.text.String, maybe 
 tango.text.String could be changed to tango.text.Utf8String? ;)  I see 
 myself using toUtf8 way more than using tango.text.String, so I'd rather 
 have the annoyance there.
I can understand the desire to avoid the confusion which would no doubt occur having Object.toString returning char[] in a library where a String class existed. Disclaimer: I haven't yet delved into Tango and actually used it for something, so I may have no idea what I'm talking about here next... I suspect the initial motivation for tango.text.String was to provide an invariant string type? and perhaps to bind member functions to the string type? So.. assuming we get a const which provides invariant char[] arrays and can call any function of the form R func(A) in the form A.func then is there any need for tango.text.String any more? (aside from the fact that it's probably used everywhere) Regan
Sep 14 2007
parent "Steven Schveighoffer" <schveiguy yahoo.com> writes:
"Regan Heath" <regan netmail.co.nz> wrote in message 
news:fceb20$24n9$1 digitalmars.com...
 Steven Schveighoffer wrote:
 "Regan Heath" wrote
 Perhaps to clarify that toString is not returning a tango.text.String, 
 maybe tango.text.String could be changed to tango.text.Utf8String? ;)  I 
 see myself using toUtf8 way more than using tango.text.String, so I'd 
 rather have the annoyance there.
I can understand the desire to avoid the confusion which would no doubt occur having Object.toString returning char[] in a library where a String class existed. Disclaimer: I haven't yet delved into Tango and actually used it for something, so I may have no idea what I'm talking about here next... I suspect the initial motivation for tango.text.String was to provide an invariant string type? and perhaps to bind member functions to the string type? So.. assuming we get a const which provides invariant char[] arrays and can call any function of the form R func(A) in the form A.func then is there any need for tango.text.String any more? (aside from the fact that it's probably used everywhere)
String has a lot of features in it. look at http://www.dsource.org/projects/tango/docs/current/source/tango.text.String.html I thought at first glance that String was an alias to StringView!(char), which is derived from UniString(T), but String actually is also a template, so my idea of String being renamed Utf8String is not correct. I guess there could be another solution, but I won't try again :) -Steve
Sep 14 2007
prev sibling parent reply Sean Kelly <sean f4.ca> writes:
Steven Schveighoffer wrote:
 
 BTW, I still prefer toString :)
Frankly, I don't even mind toString too much. It's toWString and toDString I have a problem with :-)
 Perhaps to clarify that toString is not returning a tango.text.String, maybe 
 tango.text.String could be changed to tango.text.Utf8String? ;)  I see 
 myself using toUtf8 way more than using tango.text.String, so I'd rather 
 have the annoyance there.
tango.text.String is kind of a quantum string, since it can basically be manipulated as a char[], wchar[], or dchar[] (ie. utf-8, utf-16, and utf-32). So Utf8String isn't really appropriate :-) The name would have to change to something else generic like 'Text'. Sean
Sep 14 2007
next sibling parent reply "Janice Caron" <caron800 googlemail.com> writes:
On 9/14/07, Sean Kelly <sean f4.ca> wrote:
 tango.text.String is kind of a quantum string, since it can basically be
 manipulated as a char[], wchar[], or dchar[] (ie. utf-8, utf-16, and
 utf-32).  So Utf8String isn't really appropriate :-)
UnicodeString?
Sep 14 2007
parent simax <simax gmx.net> writes:
Janice Caron Wrote:

 On 9/14/07, Sean Kelly <sean f4.ca> wrote:
 tango.text.String is kind of a quantum string, since it can basically be
 manipulated as a char[], wchar[], or dchar[] (ie. utf-8, utf-16, and
 utf-32).  So Utf8String isn't really appropriate :-)
UnicodeString?
I preper Sean's Text. It's simple and easy to write.
Sep 14 2007
prev sibling parent simax <simax gmx.net> writes:
Sean Kelly Wrote:
 
 tango.text.String is kind of a quantum string, since it can basically be 
 manipulated as a char[], wchar[], or dchar[] (ie. utf-8, utf-16, and 
 utf-32).  So Utf8String isn't really appropriate :-)  The name would 
 have to change to something else generic like 'Text'.
 
Sounds good :-)
Sep 14 2007
prev sibling parent reply Jascha Wetzel <"[firstname]" mainia.de> writes:
Sean Kelly wrote:
 Well, the first issues to address are the few incompatibility points 
 between Tango and Phobos within the runtime, the most visible being 
 Object.toString in Phobos vs. Obejct.toUtf8 in Tango.  This likely means 
 toUtf8 in Tango will have to change to toString, so if anyone absolutely 
 hates the idea, you're welcome to say so :-)  However, I suspect there 
 is a quiet majority using Phobos, so even valid arguments against the 
 way it does things may have to be ignored if the change would break some 
 user-visible portion of the Phobos library.  Suggestions here are 
 welcome also.
ridiculously, the only reason i can come up with, that kept me from using tango in programs that don't use networking, is the verbose string formatting syntax (i don't want to start a discussion about which one is better. i consider it a matter of taste). when tango and phobos will co-exist painlessly, i'll probably be using std.stdio, std.format and everything else from tango :)
Sep 14 2007
next sibling parent reply Sean Kelly <sean f4.ca> writes:
Jascha Wetzel wrote:
 Sean Kelly wrote:
 Well, the first issues to address are the few incompatibility points 
 between Tango and Phobos within the runtime, the most visible being 
 Object.toString in Phobos vs. Obejct.toUtf8 in Tango.  This likely 
 means toUtf8 in Tango will have to change to toString, so if anyone 
 absolutely hates the idea, you're welcome to say so :-)  However, I 
 suspect there is a quiet majority using Phobos, so even valid 
 arguments against the way it does things may have to be ignored if the 
 change would break some user-visible portion of the Phobos library.  
 Suggestions here are welcome also.
ridiculously, the only reason i can come up with, that kept me from using tango in programs that don't use networking, is the verbose string formatting syntax (i don't want to start a discussion about which one is better. i consider it a matter of taste).
I go on about this a lot, but being from a C++ background I'm quite used to wrapping library routines to give them an appearance suitable for my application. For formatting, it would be simple to do something like: import tango.text.convert.Layout; private static Layout layout; static this() { layout = new Layout(char); } char[] format( char[] fmt, ... ) { return layout.convert( fmt ); } Layout is stateless so there are no thread synchronization issues to worry about. Tango was designed with these sort of customizations in mind, and tries to make very few assumptions about behavior in order to allow for the greatest possible flexibility. For what it's worth, the topic of providing wrapper routines as a part of Tango has come up before, but in my experience every program has slightly different requirements, so it would be difficult to come up with a design that was universally appealing. However, given the rather trivial nature of most wrappers (as demonstrated above), I don't expect this to be a significant burden. It may be more than is expected of a novice programmer, but they typically have fewer demands about how a library should be designed as well :-)
 when tango and phobos will co-exist painlessly, i'll probably be using 
 std.stdio, std.format and everything else from tango :)
I'll admit that I prefer using simple functions like this in many cases as well. My approach is only different in that I create wrappers like the above to provide functionality in the manner I prefer. Sean
Sep 14 2007
parent Jascha Wetzel <"[firstname]" mainia.de> writes:
Sean Kelly wrote:
 [...]
hm, good point. i should overcome my sloth and do the same. what's left is getting used to typing {} instead of %s, which is less convenient on a german keyboard ;)
Sep 14 2007
prev sibling parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
Jascha Wetzel wrote:
 Sean Kelly wrote:
 Well, the first issues to address are the few incompatibility points 
 between Tango and Phobos within the runtime, the most visible being 
 Object.toString in Phobos vs. Obejct.toUtf8 in Tango.  This likely 
 means toUtf8 in Tango will have to change to toString, so if anyone 
 absolutely hates the idea, you're welcome to say so :-)  However, I 
 suspect there is a quiet majority using Phobos, so even valid 
 arguments against the way it does things may have to be ignored if the 
 change would break some user-visible portion of the Phobos library.  
 Suggestions here are welcome also.
ridiculously, the only reason i can come up with, that kept me from using tango in programs that don't use networking, is the verbose string formatting syntax (i don't want to start a discussion about which one is better. i consider it a matter of taste). when tango and phobos will co-exist painlessly, i'll probably be using std.stdio, std.format and everything else from tango :)
The only thing I really use consistently from Phobos that I actually *like* using is std.stdio. The thought has occurred to me a few times that Tango would be much more attractive to me if it only had writefln. I tried Tangobos but it states pretty clearly that it's not intended as a long-term solution, and that you are expected to use it as a transition crutch as you finish porting your code to pure Tango. But I don't *want* to get rid of my writefln's. I *like* them. I thought maybe I was the only one with such irrational attachments, but it seems I'm not alone. :-) If that's the case then hopefully someone will make a port of std.stdio to Tango at some point. That makes more sense to me than everybody rolling their own as Sean suggests. --bb
Sep 14 2007
next sibling parent BCS <BCS pathlink.com> writes:
Bill Baxter wrote:
 Jascha Wetzel wrote:
 
 Sean Kelly wrote:

 Well, the first issues to address are the few incompatibility points 
 between Tango and Phobos within the runtime, the most visible being 
 Object.toString in Phobos vs. Obejct.toUtf8 in Tango.  This likely 
 means toUtf8 in Tango will have to change to toString, so if anyone 
 absolutely hates the idea, you're welcome to say so :-)  However, I 
 suspect there is a quiet majority using Phobos, so even valid 
 arguments against the way it does things may have to be ignored if 
 the change would break some user-visible portion of the Phobos 
 library.  Suggestions here are welcome also.
ridiculously, the only reason i can come up with, that kept me from using tango in programs that don't use networking, is the verbose string formatting syntax (i don't want to start a discussion about which one is better. i consider it a matter of taste). when tango and phobos will co-exist painlessly, i'll probably be using std.stdio, std.format and everything else from tango :)
The only thing I really use consistently from Phobos that I actually *like* using is std.stdio. The thought has occurred to me a few times that Tango would be much more attractive to me if it only had writefln. I tried Tangobos but it states pretty clearly that it's not intended as a long-term solution, and that you are expected to use it as a transition crutch as you finish porting your code to pure Tango. But I don't *want* to get rid of my writefln's. I *like* them. I thought maybe I was the only one with such irrational attachments, but it seems I'm not alone. :-) If that's the case then hopefully someone will make a port of std.stdio to Tango at some point. That makes more sense to me than everybody rolling their own as Sean suggests. --bb
Maybe Tango and phobos could become two parts of the same lib. Phobos would be a collection of light weight modules with free functions and a few classes (with very simple hierarchys) that "gets the simple stuff done". Tango would the the Big brother side with lots-o-functionality.
Sep 14 2007
prev sibling next sibling parent jcc7 <technocrat7 gmail.com> writes:
== Quote from Bill Baxter (dnewsgroup billbaxter.com)'s article
 Jascha Wetzel wrote:
 Sean Kelly wrote:
 Well, the first issues to address are the few incompatibility
 points between Tango and Phobos within the runtime, the most
 visible being Object.toString in Phobos vs. Obejct.toUtf8 in
 Tango.  This likely means toUtf8 in Tango will have to change to
 toString, so if anyone absolutely hates the idea, you're welcome
 to say so :-)  However, I suspect there is a quiet majority using
 Phobos, so even valid arguments against the way it does things
 may have to be ignored if the change would break some
 user-visible portion of the Phobos library.
 Suggestions here are welcome also.
ridiculously, the only reason i can come up with, that kept me from using tango in programs that don't use networking, is the verbose string formatting syntax (i don't want to start a discussion about which one is better. i consider it a matter of taste). when tango and phobos will co-exist painlessly, i'll probably be using std.stdio, std.format and everything else from tango :)
The only thing I really use consistently from Phobos that I actually *like* using is std.stdio. The thought has occurred to me a few times that Tango would be much more attractive to me if it only had writefln. I tried Tangobos but it states pretty clearly that it's not intended as a long-term solution, and that you are expected to use it as a transition crutch as you finish porting your code to pure Tango. But I don't *want* to get rid of my writefln's. I *like* them. I thought maybe I was the only one with such irrational attachments, but it seems I'm not alone. :-) If that's the case then hopefully someone will make a port of std.stdio to Tango at some point. That makes more sense to me than everybody rolling their own as Sean suggests. --bb
I basically agree. I don't think it's irrational at all to prefer writefln. That's what I prefer. That's what I know better. That's what my console example code uses (and most of my examples are console-only). I spent enough time learning the Tango way of displaying text to discover it's not easy to switch between using Phobos and Tango (such as by using version statements) if a program sends much text to the console. And the programs I write in D typically send enough text to the console to make the differences matter. As others have written, it's largely matter of style more than anything else, but it's impractical for me to have to want to learn another style when I already know how to write code that works with the default set up of DMD. I haven't been that enticed yet by the other goodies that Tango offers to get over that. If the Tango crowd think it's a principled position to not include std.stdio's writefln, then I think it is an equally principled position to not use Tango as long as it excludes a std.stdio-style writefln. ;)
Sep 14 2007
prev sibling parent reply simax <simax gmx.net> writes:
Bill Baxter Wrote:


 The only thing I really use consistently from Phobos that I actually 
 *like* using is std.stdio.  The thought has occurred to me a few times 
 that Tango would be much more attractive to me if it only had writefln.
I absolutly agree.
 
 I tried Tangobos but it states pretty clearly that it's not intended as 
 a long-term solution, and that you are expected to use it as a 
 transition crutch as you finish porting your code to pure Tango.  But I 
 don't *want* to get rid of my writefln's.  I *like* them.
I like it too.
 
 I thought maybe I was the only one with such irrational attachments, but 
 it seems I'm not alone.  :-)  If that's the case then hopefully someone 
 will make a port of std.stdio to Tango at some point.  That makes more 
 sense to me than everybody rolling their own as Sean suggests.
 
This is only meaningful if tango replaces phobos. But i think many people like phobos. I prefer phobos as a lightweigt library and tango as extension. Sin
Sep 14 2007
parent reply "Janice Caron" <caron800 googlemail.com> writes:
On 9/14/07, simax <simax gmx.net> wrote:

I haven't used Tango (yet?). But I don't think I'll try it if it means
I'll have to stop using Phobos. I had originally assumed it was an
add-on, not a replacement. Is that wrong? Anyway, if it's a
replacement, that's definitely a disincentive.

After all - why rewrite writefln()? It's already there. (...as in, in Phobos).
Sep 14 2007
next sibling parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
Janice Caron wrote:
 On 9/14/07, simax <simax gmx.net> wrote:
 
 I haven't used Tango (yet?). But I don't think I'll try it if it means
 I'll have to stop using Phobos. I had originally assumed it was an
 add-on, not a replacement. Is that wrong? Anyway, if it's a
 replacement, that's definitely a disincentive.
Yep, that's what all the hubub is about.
 After all - why rewrite writefln()? It's already there. (...as in, in Phobos).
Better support for localization for one. Tango's routines let you change the order of arguments in the format string, since the grammars of different languages don't always use the same word order. You can say "{1} is {2}" in Tango, in contrast to "%s is %s" of writefln. But it's definitely an "if it ain't broke..." kind of situation. For most folks writefln does what they need with a minimum of fuss. Heck, Walter seems to still use printf even. --bb
Sep 14 2007
next sibling parent Sean Kelly <sean f4.ca> writes:
Bill Baxter wrote:
 
 But it's definitely an "if it ain't broke..." kind of situation.  For 
 most folks writefln does what they need with a minimum of fuss.  Heck, 
 Walter seems to still use printf even.
I still use printf too :-p It has the advantage of not requiring a working D library, which makes it quite useful for debugging runtime code. Sean
Sep 14 2007
prev sibling next sibling parent reply "Janice Caron" <caron800 googlemail.com> writes:
On 9/14/07, Bill Baxter <dnewsgroup billbaxter.com> wrote:
 Better support for localization for one.  Tango's routines let you
 change the order of arguments in the format string, since the grammars
 of different languages don't always use the same word order.  You can
 say "{1} is {2}" in Tango, in contrast to "%s is %s" of writefln.
I understand why that functionality is a good thing, but why should that mean the libraries are incompatible? Why not just give the function a different name, e.g. echo instead of writef, echoln instead of writefln? Not to be nitpicky or anything, but what if I want argument reordering /and/ formating? e.g. suppose I want to echo the second argument as "%+6.2f"? Or ... maybe formatting should be independent of output stream anyway. Maybe it should be writefln(format(...)) instead? Anyway, compatibility is way more important that what any given function actually does, so really that, I agree, is the issue.
Sep 14 2007
next sibling parent Sean Kelly <sean f4.ca> writes:
Janice Caron wrote:
 On 9/14/07, Bill Baxter <dnewsgroup billbaxter.com> wrote:
 Better support for localization for one.  Tango's routines let you
 change the order of arguments in the format string, since the grammars
 of different languages don't always use the same word order.  You can
 say "{1} is {2}" in Tango, in contrast to "%s is %s" of writefln.
I understand why that functionality is a good thing, but why should that mean the libraries are incompatible? Why not just give the function a different name, e.g. echo instead of writef, echoln instead of writefln? Not to be nitpicky or anything, but what if I want argument reordering /and/ formating? e.g. suppose I want to echo the second argument as "%+6.2f"?
The Tango routine provides formatting options as well. It follows the C# style described here: http://blog.stevex.net/index.php/string-formatting-in-csharp/ Sean
Sep 14 2007
prev sibling parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
Janice Caron wrote:
 On 9/14/07, Bill Baxter <dnewsgroup billbaxter.com> wrote:
 Better support for localization for one.  Tango's routines let you
 change the order of arguments in the format string, since the grammars
 of different languages don't always use the same word order.  You can
 say "{1} is {2}" in Tango, in contrast to "%s is %s" of writefln.
I understand why that functionality is a good thing, but why should that mean the libraries are incompatible?
No argument from me there. I was just answering the question "why would you rewrite writefln?"
 Why not just give the
 function a different name, e.g. echo instead of writef, echoln instead
 of writefln?
It does have a different name in Tango.
 Not to be nitpicky or anything, but what if I want argument reordering
 /and/ formating? e.g. suppose I want to echo the second argument as
 "%+6.2f"?
Yep Tango's routines have that too.
 Or ... maybe formatting should be independent of output stream anyway.
 Maybe it should be writefln(format(...)) instead?
I think that may be one thing that is still lacking in Phobos. You can't *not* do formatted output. I recall someone provided a patch to add unformatted output routines, but AFAIK it was never applied. It's a good example of why Phobos will never be half the library Tango is. Walter is the only one with write access, and he's too busy with compiler things to have time to review and merge Phobos patches. It's a surefire recipe for Phobos going nowhere fast.
 Anyway, compatibility is way more important that what any given
 function actually does, so really that, I agree, is the issue.
It shouldn't actually be too difficult to port most Tango libraries to Phobos or vice versa. I haven't tried it, but it must be a lot easier than porting C++ code to D, which I have done a fair share of. I think the main things for most libs would just be making the trivial toUtf8<->toString conversion, and then rewriting any IO-using bits. Of you could also just port the whole IO layer first. --bb
Sep 14 2007
parent reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Bill Baxter wrote:

 I think that may be one thing that is still lacking in Phobos.  You 
 can't *not* do formatted output.  I recall someone provided a patch to 
 add unformatted output routines, but AFAIK it was never applied.
It was called "writeln", and came as part of the "readf" addition... See digitalmars.D/15627, digitalmars.D/19835 and digitalmars.D/21692
 It's a 
 good example of why Phobos will never be half the library Tango is. 
 Walter is the only one with write access, and he's too busy with 
 compiler things to have time to review and merge Phobos patches.  It's a 
 surefire recipe for Phobos going nowhere fast.
The same can be said for DMD... Fortunately both are open source ? Patches to Phobos can go into GDC, just like compiler patches can. --anders
Sep 15 2007
parent reply TomD <t_demmer_no_spam_ web.de> writes:
Anders F Björklund Wrote:

[...]
 The same can be said for DMD... Fortunately both are open source ?
:-)
 
 Patches to Phobos can go into GDC, just like compiler patches can.
 
well, the last thing we need is just another fork. What really worries me is the total absence of Walter in this discussion. I had another look at Tango and again came to the result I do not like it. It would really be a pity seeing Phobos going down the drain. Ciao Tom
Sep 15 2007
next sibling parent reply "Janice Caron" <caron800 googlemail.com> writes:
On 9/15/07, TomD <t_demmer_no_spam_ web.de> wrote:
 What really worries me is the total absence of Walter in this discussion. I
had another look at Tango and again came to the result I do not like it. It
would really be a pity seeing Phobos going down the drain.
I had not looked at Tango before this discussion, but now that I have, I have to say I don't like it either. It's not the functionality that irks me, it's the /style/. I mean: import tango.io.Stdout; Stdout( i )( " = " )( s ).newline; Module names in mixed case!? Did the Tango folk not read the D style guide where it says "Module and package names are all lower case, and only contain the characters [a..z][0..9][_]", or did they just purposefully decide to avoid it? If the former, that was amateurish; if the latter, it was petty. Function names in mixed case? I assume Stdout is a function. Phobos has function names in lower case, and that's how I like them. Currying parameters? (That's the malarky with the brackets). What's wrong with variadic arguments? And what's with the .newline? Isn't "\n" supposed to translate to the platform-specific linebreak convention? Besides, it looks weird, having the newline specified differently from all the other bits of output. I was happy with: import std.stdio; writefln(i," = ",s); I still am. I don't see that changing any time soon. Granted, Tango has extra functionality, but why not just provide that as add-ons to Phobos, using the same style and naming conventions? My apologies if I come across as contentious. I realise I'm a newbie in this group. But that is the first impression I get from looking at the Tango docs. I just ask myself over and over again, "Why did they do that?" (...which should be regarded as a rhetorical question which really means "I wish they hadn't done that").
Sep 15 2007
next sibling parent reply Sean Kelly <sean f4.ca> writes:
Janice Caron wrote:
 On 9/15/07, TomD <t_demmer_no_spam_ web.de> wrote:
 What really worries me is the total absence of Walter in this discussion. I
had another look at Tango and again came to the result I do not like it. It
would really be a pity seeing Phobos going down the drain.
I had not looked at Tango before this discussion, but now that I have, I have to say I don't like it either. It's not the functionality that irks me, it's the /style/. I mean: import tango.io.Stdout; Stdout( i )( " = " )( s ).newline;
This is only one of about four styles for IO, and it's probably the least commonly used these days.
 Module names in mixed case!? Did the Tango folk not read the D style
 guide where it says "Module and package names are all lower case, and
 only contain the characters [a..z][0..9][_]", or did they just
 purposefully decide to avoid it? If the former, that was amateurish;
 if the latter, it was petty.
Or perhaps there was another reason for the decision. Kris could explain the rationale best, but some of it is covered here: http://www.dsource.org/projects/tango/wiki/CodingConventions
 Function names in mixed case? I assume Stdout is a function. Phobos
 has function names in lower case, and that's how I like them.
It's a class instance, actually. And I agree that this is a bit contrary to typical coding conventions. I believe it may be this way because the routines were previously static methods and no instance existed at all.
 Currying parameters? (That's the malarky with the brackets). What's
 wrong with variadic arguments?
Please see Stdout.format().
 And what's with the .newline? Isn't "\n" supposed to translate to the
 platform-specific linebreak convention? Besides, it looks weird,
 having the newline specified differently from all the other bits of
 output.
You're free to use "\n" as well--it works in all the cases I've tried. The .newline method is similar to std::endl in C++.
 I was happy with:
 
 import std.stdio;
 writefln(i," = ",s);
 
 I still am. I don't see that changing any time soon.
import tango.io.Stdout; void writeln(Args...)( Args args ) { foreach( arg; args ) Stdout( arg ); Stdout.newline; } Perhaps not perfect, but not bad for ten seconds of typing.
 Granted, Tango has extra functionality, but why not just provide that
 as add-ons to Phobos, using the same style and naming conventions?
Because the coding conventions proved insufficient for a library of this size.
 My apologies if I come across as contentious. I realise I'm a newbie
 in this group. But that is the first impression I get from looking at
 the Tango docs. I just ask myself over and over again, "Why did they
 do that?" (...which should be regarded as a rhetorical question which
 really means "I wish they hadn't done that").
I suppose it would help if we made public the volumes of discussion we had prior to release :-) However, the website does have quite a bit of the rationale if you dig around a bit. In particular, the contributor's section is fairly informative: http://www.dsource.org/projects/tango/wiki/RollickingFellowsGuide Sean
Sep 15 2007
next sibling parent reply TomD <t_demmer_no_spam_ web.de> writes:
Sean Kelly Wrote:

 Janice Caron wrote:
 On 9/15/07, TomD <t_demmer_no_spam_ web.de> wrote:
 What really worries me is the total absence of Walter in this discussion. I
had another look at Tango and again came to the result I do not like it. It
would really be a pity seeing Phobos going down the drain.
I had not looked at Tango before this discussion, but now that I have, I have to say I don't like it either. It's not the functionality that irks me, it's the /style/. I mean: import tango.io.Stdout; Stdout( i )( " = " )( s ).newline;
This is only one of about four styles for IO, and it's probably the least commonly used these days.
Why is this then the style in http://www.dsource.org/projects/tango/wiki/TutSimpleIO ? That's is deterring. If this is simple, I do not want to see the complicated stuff. Also, http://www.dsource.org/projects/tango/wiki/ChapterIO talks about a lot of complex stuff. How do I read a double from a stream, separated by white space, by comma, whatever? Don't get me wrong, it's not that the Phobos docs are much better, but that is legacy libc that everyone (well, ) knows from growing up. The docs are not written n a way that mea me feel like I get things done quickly. Ciao Tom
Sep 15 2007
parent kris <foo bar.com> writes:
TomD wrote:
 This is only one of about four styles for IO, and it's probably the 
 least commonly used these days.
Why is this then the style in http://www.dsource.org/projects/tango/wiki/TutSimpleIO
Tango actually has two layers on the console: 1) a group of static objects called Cout, Cerr, and Cin 2) formatting wrappers called Stdout and Stderr The former are low-level and support char[] only, while the latter do all kind of formatting and can be customized with optional I18N formatters, or redirected to your taste (into a memory accumulator, if you desire). Cout doesn't support vararg at this time, being a low level idiom. It does, however, return itself for each call, so they can be chained. The documentation you linked above talks about the console only. No big deal? There are those who stylistically prefer writeln() instead, and that's cool. I understand one of those folks is modifying the generic Layout facility in order to make it behave in a less class-like manner. There's a variety of reasons why Tango does this differently from phobos, and we spent a lot of time debating each of those. - Kris
Sep 15 2007
prev sibling next sibling parent reply kris <foo bar.com> writes:
 Janice Caron wrote:
 Module names in mixed case!? Did the Tango folk not read the D style
 guide where it says "Module and package names are all lower case, and
 only contain the characters [a..z][0..9][_]", or did they just
 purposefully decide to avoid it? If the former, that was amateurish;
 if the latter, it was petty.
Do you *honestly* think we've spent this formidable effort in creating a rich, fully-featured and cost-free library, for people like you to use (if you so desire), just because we need to satisfy an urge to be "petty" or "amateurish" ?
 Granted, Tango has extra functionality, but why not just provide that
 as add-ons to Phobos, using the same style and naming conventions?
You assume that we didn't try to do that?
 My apologies if I come across as contentious. I realise I'm a newbie
 in this group. But that is the first impression I get from looking at
 the Tango docs. I just ask myself over and over again, "Why did they
 do that?" (...which should be regarded as a rhetorical question which
 really means "I wish they hadn't done that").
So, help us clean up the Documentation? Tango has matured rapidly, given the number of (very capable) people involved: http://www.dsource.org/projects/tango/wiki/Contributors The biggest problem for us is a simple one: we need people to help us with the doc. Wanna help? You can always push to get changes made in the library also. If you look at the issue-list for Tango, there's all kinds of changes that have gone in since January. It's a /very/ active and fertile library. While we do get some tricky requests, most active participants tend to find their wishes are treated with a sense of urgency. Turnaround time for some of those have been measured in seconds ;)
Sep 15 2007
parent reply "Janice Caron" <caron800 googlemail.com> writes:
On 9/16/07, kris <foo bar.com> wrote:
 Janice Caron wrote:
 Module names in mixed case!? Did the Tango folk not read the D style
 guide where it says "Module and package names are all lower case, and
 only contain the characters [a..z][0..9][_]", or did they just
 purposefully decide to avoid it? If the former, that was amateurish;
 if the latter, it was petty.
Do you *honestly* think we've spent this formidable effort in creating a rich, fully-featured and cost-free library, for people like you to use (if you so desire), just because we need to satisfy an urge to be "petty" or "amateurish" ?
That was just a first impression. It was my *honest* first impression, but it was still just a first impression. /Of course/ first impressions aren't always right, but if I were in your shoes, I'd definitely like to recieve honest criticism from folk, especially about first impressions. To make an analogy, let's liken it to a novel. If you show me an excellent novel with a brilliant storyline and excellent characterisation, but for which chapter one is lousy, I'm probably not going to read chapter two. Sure, the author can blame the reader for not "getting" it, but it's unlikely to help the author get any readers. So I apologise if my first impression offended you, but yes, I was being honest. Perhaps I might have a different opinion if you could answer the following question: Why did you violate the D style guide?
 why not just provide that
 as add-ons to Phobos, using the same style and naming conventions?
You assume that we didn't try to do that?
Again, not trying to be offensive, but actually yes, I did assume that. That could be a failure of imagination on my part, of course, but the website provides no explanation of (a) why this functionality could not have been provided in the form of add-ons to Phobos, nor (b) why the same style and naming conventions as Phobos were not followed. But I'm happy to be corrected, so tell me: What happened when you tried?
 So, help us clean up the Documentation?
 The biggest problem for us is a simple one: we need people to help us
 with the doc. Wanna help?
Vicious circle there! :-) I can't document something I don't understand, and I can't understand something which isn't well documented. Above and beyond all that, I can't honestly say I'm interested. In my first post on this topic, I wrote: "I had not looked at Tango before this discussion, but now that I have, I have to say I don't like it either". Given that, why would I want to help the project? I'm not trying to be awkward or anything, but I do actually need to like something before I'd be prepared to commit any of my valuable spare time on it. There are just so many things that I /do/ like in the world that are also begging for my spare time. But here's an example of where I started to get turned off. When reading the Introduction page, I groaned when I read "instead of merely listing objects and methods in dry sequential fashion,...". Perhaps this might surprise you, but some of us /like/ comprehensive lists of objects and methods, and find it the best way to understand things. (In fact, my preference would be, listing objects and methods in hyperlinked fashion).
 You can always push to get changes made in the library also.
Perhaps. But your suggestion presupposes that I'm interested. Right now, I'm just shrugging my shoulders and thinking "not for me". And honestly, the styistic issues matter very greatly in that appraisal.
 While we do
 get some tricky requests, most active participants tend to find their
 wishes are treated with a sense of urgency. Turnaround time for some of
 those have been measured in seconds ;)
Right, but to attract the public, you need to look at some of wishes raised by /non/-active participants, because they are never going to /become/ active participants so long as they perceive that it's "not for me". So, for example, I request that module names be lowercase, as per the style guide. It's not much, but it would be a good first step.
Sep 15 2007
next sibling parent reply kris <foo bar.com> writes:
Janice Caron wrote:
 On 9/16/07, kris <foo bar.com> wrote:
 Janice Caron wrote:
 Module names in mixed case!? Did the Tango folk not read the D style
 guide where it says "Module and package names are all lower case, and
 only contain the characters [a..z][0..9][_]", or did they just
 purposefully decide to avoid it? If the former, that was amateurish;
 if the latter, it was petty.
 Do you *honestly* think we've spent this formidable effort in creating a
 rich, fully-featured and cost-free library, for people like you to use
 (if you so desire), just because we need to satisfy an urge to be
 "petty" or "amateurish" ?
 That was just a first impression. It was my *honest* first impression,
 but it was still just a first impression [snip]
First impressions are one thing whilst assertions over how things came to be are quite another. There's a lot of people involved around Tango ... I'm thinking hard, but truly don't know of even one individual who could possibly fit your broadly generous and most humble assertions :p To illustrate the distinction: I now have a first impression of yourself yet, unlike you, I'm not immediately asserting that you're either an amateur or a wanker ;) Capice? Everyone's opinion is valuable to us at Tango. Period.
 but yes, I was being honest.
To write off an extensive library as being constructed by an "amateurish" group (as you noted) simply because it doesn't adhere to some minor stylistic suggestion is, well -- to apply your terminology -- rather petty. Is it not? Certainly not helpful in the constructive sense? I mean, there appears only to be some misunderstanding on your part (Stdout.format et al), combined with some distaste for one specific stylistic concern? Please, write up a ticket for the specific things you don't like? It may be of benefit to others? As a ticket, we can track its progress and ensure it gets addressed in a timely fashion. Much more effective than idle chit-chat over tea: http://www.dsource.org/projects/tango/newticket (oh, you may need to be a dsource.org 'member' to write tickets)
 You assume that we didn't try to do that?
Again, not trying to be offensive, but actually yes, I did assume that. That could be a failure of imagination on my part, of course, but the website provides no explanation of (a) why this functionality could not have been provided in the form of add-ons to Phobos
I believe it /does/ talk about it. But then there's hardly a crushing need for that to be plastered across the front-page, particularly since it has never come up as a concern before. Wouldn't you agree? Without hitting on a whole lot of detail, the Tango runtime support (which includes threads, exceptions, etc) has always been beyond what Phobos offered. For example, Tango has fibers (Mik & Sean). That needs to be tied into the GC also (which it is), and makes the runtime layer incompatible with the Phobos equivalent. Tango also has internal support for exception backtraces which hooks in with, for example, the Flectioned library from Thomas. The import path structure (or lack thereof) within the Phobos library, along with the namespace collisions, unfortunately lends itself to a lack of modularity and scalability. The Tango GC was both very fast and known to be free of deadlock, while the Phobos one was not until comparatively recently etc. etc. These are not intended as criticisms of Phobos, but they and many more became reason enough to take the path that the Tango folks did.
 So, help us clean up the Documentation?
 The biggest problem for us is a simple one: we need people to help us
 with the doc. Wanna help?
Vicious circle there! :-) I can't document something I don't understand, and I can't understand something which isn't well documented.
Without additional help, there's only so much a group of motivated volunteers can do in a specific time-frame.
 There are just so many things that I
 /do/ like in the world that are also begging for my spare time.
You're not exactly alone in that regard. Implication aside, it's just fine that you don't have an interest. Absolutely no probnoblem at all. However, I do suspect you'd enjoy a whole lot more of it if the doc were better in places, and you gave it a little time. Failing that, some constructive criticism (especially in a Ticket) is far more helpful than the "you ppl must be morons" approach ?
 Perhaps this might surprise you, but some of us /like/ comprehensive
 lists of objects and methods, and find it the best way to understand
 things. (In fact, my preference would be, listing objects and methods
 in hyperlinked fashion).
Then perhaps you didn't look very far? On the *home* page is a link to this: http://www.dsource.org/projects/tango/docs/current/ It lives directly below the Ref Manual link on the home page: http://www.dsource.org/projects/tango/wiki Yes, the doc could be better overall. Some of it is just awesome, whilst some of it kinda sucks (my writing skills, for example). The api doc doesn't link together in the fashion we'd like it to (per Javadoc and others), since the tools for D documentation are still somewhat immature. I understand some of the api doc presentation may occasionally be broken, due to minor bugs in DDoc? Hey!! Perhaps you'd like to contribute something in that arena instead? Anyway, click on a link, you get doc. Click on the BigBlueTitle in the doc, you get the source code. Click on the other blue links, you get a wiki page where people (such as yourself) can add notes to share with others (which can then get rolled into the main doc). It's really not too hard?
 And
 honestly, the styistic issues matter very greatly in that appraisal.
Plural? I thought there was just one stylistic concern, about the module names or something? Seriously, it ain't easy keeping track of such things in the NG when there's a list of existing tickets to address. Please, write a ticket! :-D
Sep 16 2007
next sibling parent reply "Janice Caron" <caron800 googlemail.com> writes:
On 9/16/07, kris <foo bar.com> wrote:
 First impressions are one thing whilst assertions over how things came
 to be are quite another.
No problem. Now that I understand that you are not interested in hearing my unsolicited opinions on the matter, I shall trouble you with them no more.
 To write off an extensive library as being constructed by an
 "amateurish" group (as you noted) simply because it doesn't adhere to
 some minor stylistic suggestion is, well -- to apply your terminology --
 rather petty. Is it not? Certainly not helpful in the constructive sense?
I don't consider the D Style Guide by Walter Bright to be a "minor stylistic suggestion", I consider it to be part of the D specificiation. http://digitalmars.com/d/dstyle.html I quote: "Submissions to Phobos and other official D source code will follow these guidelines." I am truly sorry that use of the word "petty" offended you. If it helps ease tensions, then I apologise for using it.
 Please, write up a ticket for the specific things you don't like?
 (oh, you may need to be a dsource.org 'member' to write tickets)
Sorry, but I'm not registering with a forum just to complain about something I don't care about. That would be silly. The onus is on the author of a creative work to please the audience, not the on audience to register with a forum to open a ticket to explain to the author why it didn't appeal to them. That's just not how the world works.
Sep 16 2007
next sibling parent Derek Parnell <derek psych.ward> writes:
On Sun, 16 Sep 2007 11:55:04 +0100, Janice Caron wrote:

 On 9/16/07, kris <foo bar.com> wrote:
 First impressions are one thing whilst assertions over how things came
 to be are quite another.
No problem. Now that I understand that you are not interested in hearing my unsolicited opinions on the matter, I shall trouble you with them no more.
 To write off an extensive library as being constructed by an
 "amateurish" group (as you noted) simply because it doesn't adhere to
 some minor stylistic suggestion is, well -- to apply your terminology --
 rather petty. Is it not? Certainly not helpful in the constructive sense?
I don't consider the D Style Guide by Walter Bright to be a "minor stylistic suggestion", I consider it to be part of the D specificiation.
I really don't think that Walter sees them as a part of the specification.
 I quote: "Submissions to Phobos and other official D source code will
 follow these guidelines."
You do know that "guideline" is not the same as "rule". These are things that Walter suggests that one ought to do to do based on his exeriences and opinions. They are not compulsions. Quoting from the same document that you just did, "The D Style is not enforced by the compiler, it is purely cosmetic and a matter of choice." I do not follow these all these guidelines in my D programming, because there are a few that I believe are misguided. That is my opinion and I expect other people to have differing opinions. And that's okay by me. The style in Tango is also not to my liking, but that doesn't influence my decision not to use Tango. In it favour though, it is written in a consistant style, which can't be said universally for phobos. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell
Sep 16 2007
prev sibling next sibling parent reply kris <foo bar.com> writes:
Janice Caron wrote:
 On 9/16/07, kris <foo bar.com> wrote:
 First impressions are one thing whilst assertions over how things came
 to be are quite another.
No problem. Now that I understand that you are not interested in hearing my unsolicited opinions on the matter, I shall trouble you with them no more.
We're *very* interested in hearing constructive criticism!
 To write off an extensive library as being constructed by an
 "amateurish" group (as you noted) simply because it doesn't adhere to
 some minor stylistic suggestion is, well -- to apply your terminology --
 rather petty. Is it not? Certainly not helpful in the constructive sense?
I don't consider the D Style Guide by Walter Bright to be a "minor stylistic suggestion", I consider it to be part of the D specificiation.
Heh :) You /are/ talking about just *one* specific suggestion in that doc -- right? That module-names should perhaps be lowercase?
 I am truly sorry that use of the word "petty" offended you. If it
 helps ease tensions, then I apologise for using it.
No need to apologise, since there's no offense taken. My post merely responded to yours. Please don't take offense over that, Janice?
 Please, write up a ticket for the specific things you don't like?
 (oh, you may need to be a dsource.org 'member' to write tickets)
Sorry, but I'm not registering with a forum just to complain about something I don't care about. That would be silly.
Ach, that's really too bad :(
 
 The onus is on the author of a creative work to please the audience,
 not the on audience to register with a forum to open a ticket to
 explain to the author why it didn't appeal to them. That's just not
 how the world works.
Perhaps you are a taker and not a giver? That's cool too, but helping out a tiny bit here and there won't actually kill you ... will it?
Sep 16 2007
parent reply "Janice Caron" <caron800 googlemail.com> writes:
On 9/16/07, kris <foo bar.com> wrote:
 The onus is on the author of a creative work to please the audience,
 not the on audience to register with a forum to open a ticket to
 explain to the author why it didn't appeal to them. That's just not
 how the world works.
Perhaps you are a taker and not a giver?
On the contrary, I'm a fiction writer - which is precisely /why/ I understand that the onus is on the author to make it interesting, not on the reader to be interested. The reader is perfectly entitled to put the book down after the first paragraph, and does not have to justify to the author why they did so. For some reason, I expect software to work the same way. :-)
 That's cool too, but helping
 out a tiny bit here and there won't actually kill you ... will it?
Just imagine you'd picked up a book in a library, read the start of it, decided it wasn't your cup of tea and put it back on the shelf. Now, helping the author rewrite it to make it more appealing to you won't actually kill you ... will it? But how often are you going to do that? Realistically, you're just going to pick up the next book. If something doesn't interest you, then you're not going to spend your time on it. The fact that spending time on will probably not result in your death is completely irrelevant.
Sep 16 2007
next sibling parent kris <foo bar.com> writes:
Janice Caron wrote:
 On 9/16/07, kris <foo bar.com> wrote:
 Perhaps you are a taker and not a giver?
On the contrary, I'm a fiction writer - which is precisely /why/ I understand that the onus is on the author to make it interesting, not on the reader to be interested. The reader is perfectly entitled to put the book down after the first paragraph, and does not have to justify to the author why they did so. For some reason, I expect software to work the same way. :-)
LOL! That's a good one, right enough :) Welcome to the world of D, where grass-roots is /still/ the de-facto approach; where open-source along and the spirit of camaraderie is genuinely prevalent. You don't wanna help, even a tiny tiny tiny bit? OK, whatever. See ya around the help-desk :p
Sep 16 2007
prev sibling parent reply Alix Pexton <_a_l_i_x_._p_e_x_t_o_n_ _g_m_a_i_l_._c_o_m_> writes:
Janice Caron wrote:
--snip--
 Realistically, you're just going to pick up the next book.
--snip-- And what if there is only one book to choose from? A...
Sep 17 2007
parent reply "Janice Caron" <caron800 googlemail.com> writes:
On 9/17/07, Alix Pexton <_a_l_i_x_._p_e_x_t_o_n_ _g_m_a_i_l_._c_o_m_> wrote:
 Janice Caron wrote:
 --snip--
 Realistically, you're just going to pick up the next book.
--snip-- And what if there is only one book to choose from?
Then you're a sad, sad person. (Either that, or you missed the analogy). The analogy was about giving up your valuable spare time, not about choosing a D library. Go back and follow the reasoning. If you have *no* interests in your life whatsoever, and working on Tango is the *only* option you have to prevent yourself from going insane with boredom, then obviously you must do that. But if, like me, you have lots and lots of spare time interests, and they are all clawing for your valuable time, then the sane choice is to pick things you care about greatly in preference to things you're not that bothered about. /That/ is the analogy I was making. My apologies if that was not clear.
Sep 17 2007
parent reply Alexander Panek <alexander.panek brainsware.org> writes:
Janice Caron wrote:
 Then you're a sad, sad person. (Either that, or you missed the
 analogy). The analogy was about giving up your valuable spare time,
 not about choosing a D library. Go back and follow the reasoning.
Wait. If you only have one book to choose from, you're a "sad, sad" person? But having more than one runtime libraries is also bad? Dude, go back and think about your reasoning.
 If you have *no* interests in your life whatsoever, and working on
 Tango is the *only* option you have to prevent yourself from going
 insane with boredom, then obviously you must do that. But if, like me,
 you have lots and lots of spare time interests, and they are all
 clawing for your valuable time, then the sane choice is to pick things
 you care about greatly in preference to things you're not that
 bothered about. /That/ is the analogy I was making. My apologies if
 that was not clear.
I think that analogy limps massively. Books, as well as software, have a rather long process of rewriting and reviewing, with people involved /other than the author/. Have you ever seen a book that has been written and printed afterwards? I didn't. This does apply for libraries, too. If you're not willing to review something, make suggestions, hints, patches , how come you even dare to use it. How can you assume that anything will be changed as you please - or even worse; is served perfectly, in a release candidate? I don't get it. I see that as a very arrogant and short-sighted attitude, nothing more. Additionally, some of us don't use D only in their spare time. So getting paid for solving problems and helping other people by sharing the solutions is like a double-win, no?
Sep 17 2007
parent reply "Janice Caron" <caron800 googlemail.com> writes:
On 9/17/07, Alexander Panek <alexander.panek brainsware.org> wrote:
 I think that analogy limps massively. Books, as well as software, have a
Books, TV programs, movies, /anything/, it doesn't matter. ANYTHING which makes a claim on your spare time is something you have to decide whether or not you can afford that spare time. Pick a TV program you don't like. Are you going to change the channel, or switch off and do something else entirely? Or are you going to join the film crew? If you don't like game shows, you switch off - you don't go and join the company that makes them to try to make them better? If you didn't like a particular movie, you just don't watch the sequel - you don't go and join the filmmaking crew and try to make the next one better. And if you read a book and discover you don't like it, then every one of us - even you - will simply put it down and not bother with it, rather than contact the author and explain how to write it better. That's not arrogant, it's just the flat reality that *consumers have a choice* of what they want to do with their leisure time. Likewise, when someone shows me a programming library in which I have no interest, I just put it down. The /last/ thing I would do is get involved with making it. You expect me to get involved in creating something I don't like and in which I have no interest? That's absurd. The answer is no. That's not arrogant, that's just saying no. I was asked to help. I said no, because I've only got so much free time, and I'd rather spend it doing other things. If you think that entitles you to call me arrogant, well, hey, I guess there's really no arguing with that is there?
Sep 17 2007
next sibling parent reply Lars Ivar Igesund <larsivar igesund.net> writes:
Janice Caron wrote:

 On 9/17/07, Alexander Panek <alexander.panek brainsware.org> wrote:
 I think that analogy limps massively. Books, as well as software, have a
Books, TV programs, movies, /anything/, it doesn't matter. ANYTHING which makes a claim on your spare time is something you have to decide whether or not you can afford that spare time. Pick a TV program you don't like. Are you going to change the channel, or switch off and do something else entirely? Or are you going to join the film crew? If you don't like game shows, you switch off - you don't go and join the company that makes them to try to make them better? If you didn't like a particular movie, you just don't watch the sequel - you don't go and join the filmmaking crew and try to make the next one better. And if you read a book and discover you don't like it, then every one of us - even you - will simply put it down and not bother with it, rather than contact the author and explain how to write it better. That's not arrogant, it's just the flat reality that *consumers have a choice* of what they want to do with their leisure time. Likewise, when someone shows me a programming library in which I have no interest, I just put it down. The /last/ thing I would do is get involved with making it. You expect me to get involved in creating something I don't like and in which I have no interest? That's absurd. The answer is no. That's not arrogant, that's just saying no. I was asked to help. I said no, because I've only got so much free time, and I'd rather spend it doing other things. If you think that entitles you to call me arrogant, well, hey, I guess there's really no arguing with that is there?
I don't think it's arrogant to say no to help, but there is still a flaw in your reasoning because with Tango, and most other open source packages, you _can_ make a difference by helping. That you don't have the time or inclination to do so, is completely fair :) As for myself, I think my time spent on improving the various aspects of Tango are well spent, considering that there never was any real room (I and many others did try) to spend that time on Phobos. Even Walter sees this as the most natural thing in the world, he knows very well that Phobos is neglected, especially compared to the compiler itself. -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Sep 17 2007
parent Alix Pexton <_a_l_i_x_._p_e_x_t_o_n_ _g_m_a_i_l_._c_o_m_> writes:
The point that I was trying to make was that if you went to the library to get
a book on
topic X, because topic X is the thing that you are interested right now,
whatever it is,
and the library only has one book on X, do you go home or do you ask the
librarian if
there are any others?

You're posting on these forums ans have contributed some interesting ideas,
which means
that you must be interested in D, so say that "topic X" is D, well guess what,
there is
only one book in the library on D, (IIRC, and its in Japanese).

I'm not a Tango user myself, but there is more value in me looking at it and
suggesting
improvements than there is in a hundred people using it everyday and thinking
it is the
best thing since sliced bread, and not having a bad thing to say about it. All
the
tickets that the Tango guys work through (and they do a pretty good job of it)
are
from people who didn't like something about Tango ('cos no one likes bugs).

As for non-colaborative works like the TV and film you mentioned, Joe Public
does
influence them, but not in the same way. If no one watches that game show, then
eventually it will go off air and be replaced by a better one. In the media, it
is not
the individul programs that are colaborative, its the stations and the studios,
they
make the show that sell. While they still air "I Love Lucy" somewhere, its not
prime-
time any more, TV evolved.

In a way, by just telling us that you are not using Tango right now and why,
you have
turned off the "Tango Chanel", and not the "Tango Show", but hey, there is a new
season coming soon, and maybe one of the new modules will get you switching
back.

A...
Sep 17 2007
prev sibling parent reply Sean Kelly <sean f4.ca> writes:
Janice Caron wrote:
 On 9/17/07, Alexander Panek <alexander.panek brainsware.org> wrote:
 I think that analogy limps massively. Books, as well as software, have a
Books, TV programs, movies, /anything/, it doesn't matter. ANYTHING which makes a claim on your spare time is something you have to decide whether or not you can afford that spare time.
...
 Likewise, when someone shows me a programming library in which I have
 no interest, I just put it down. The /last/ thing I would do is get
 involved with making it. You expect me to get involved in creating
 something I don't like and in which I have no interest? That's absurd.
 The answer is no. That's not arrogant, that's just saying no.
Comparing a modern fiction book to a software library is a weak analogy, since they present entirely different entirely different producer / consumer relationships. If such an analogy were to be made with books, I believe serial fiction would be more appropriate. In such books (as I'm sure you're aware), the material is molded based on reader response in an attempt to keep the material popular and relevant. A more accurate analogy still, however, is to compare a software library to a tool. In the construction trades I believe you'll find that complex tools are often customized by the user and craftsmen often even submit feedback to tool designers in an attempt to improve the suitability of tools for the work involved. Spare time typically isn't an issue because the time spent is a part of work, not leisure. In fact, some of Tango's users are actually involved in commercial projects. I only wish I had the time to respond to their requests and bug reports that I would if maintaining Tango were my job. Truth be told, Tango is already more popular than I expected it would be. Sean
Sep 17 2007
parent reply "Janice Caron" <caron800 googlemail.com> writes:
On 9/17/07, Sean Kelly <sean f4.ca> wrote:
 A more accurate analogy still, however, is to compare a software library
 to a tool.  In the construction trades I believe you'll find that
 complex tools are often customized by the user and craftsmen often even
 submit feedback to tool designers in an attempt to improve the
 suitability of tools for the work involved.  Spare time typically isn't
 an issue because the time spent is a part of work, not leisure.  In
 fact, some of Tango's users are actually involved in commercial
 projects.  I only wish I had the time to respond to their requests and
 bug reports that I would if maintaining Tango were my job.  Truth be
 told, Tango is already more popular than I expected it would be.
I disagree, because in this instance, nobody asked me for feedback. Instead, Kris asked me to *COMMIT MY SPARE TIME* and *HELP WITH THE DOCUMENTATION*. That's what I said no to. I did not say no to giving feedback. If you want to make the tool analogy, I'm not even using the damn tool! Instead, I looked at it, said "I don't think I'll be using it", and then the tool designer said "So help me improve it a bit", so I said "I ain't got time, mate, sorry". End of analogy. If you guys are trying to make me feel guilty about this, it's not going to work. If you don't like my analogies - fine! But for crying out loud do we really have to spend several zillion posts trying to argue about whether or not the analogy works? I was just trying to explain why I said no, that's all. I didn't realise doing so was going to cause so much grief.
Sep 17 2007
next sibling parent reply Alexander Panek <alexander.panek brainsware.org> writes:
Janice Caron wrote:
 On 9/17/07, Sean Kelly <sean f4.ca> wrote:
 A more accurate analogy still, however, is to compare a software library
 to a tool.  In the construction trades I believe you'll find that
 complex tools are often customized by the user and craftsmen often even
 submit feedback to tool designers in an attempt to improve the
 suitability of tools for the work involved.  Spare time typically isn't
 an issue because the time spent is a part of work, not leisure.  In
 fact, some of Tango's users are actually involved in commercial
 projects.  I only wish I had the time to respond to their requests and
 bug reports that I would if maintaining Tango were my job.  Truth be
 told, Tango is already more popular than I expected it would be.
I disagree, because in this instance, nobody asked me for feedback. Instead, Kris asked me to *COMMIT MY SPARE TIME* and *HELP WITH THE DOCUMENTATION*. That's what I said no to. I did not say no to giving feedback. If you want to make the tool analogy, I'm not even using the damn tool! Instead, I looked at it, said "I don't think I'll be using it", and then the tool designer said "So help me improve it a bit", so I said "I ain't got time, mate, sorry". End of analogy. If you guys are trying to make me feel guilty about this, it's not going to work. If you don't like my analogies - fine! But for crying out loud do we really have to spend several zillion posts trying to argue about whether or not the analogy works? I was just trying to explain why I said no, that's all. I didn't realise doing so was going to cause so much grief.
Well, actually you have been ranting about Tango (i.e.: Tango developers not following the D Style Guide, not trying to be anyhow compatible with Phobos and especially your phrase about the development of Tango: "I wish they hadn't done that"). You didn't quite make a valid point why you don't like Tango (besides the style, which has its [well thought through] reason). That's ok, but giving constructive critique would have been a better way to spend time - as opposed to ranting -, which is the whole point of this discussion, I think.
Sep 17 2007
parent reply Brad Anderson <brad dsource.org> writes:
Alexander Panek wrote:
 Janice Caron wrote:
 On 9/17/07, Sean Kelly <sean f4.ca> wrote:
 A more accurate analogy still, however, is to compare a software library
 to a tool.  In the construction trades I believe you'll find that
 complex tools are often customized by the user and craftsmen often even
 submit feedback to tool designers in an attempt to improve the
 suitability of tools for the work involved.  Spare time typically isn't
 an issue because the time spent is a part of work, not leisure.  In
 fact, some of Tango's users are actually involved in commercial
 projects.  I only wish I had the time to respond to their requests and
 bug reports that I would if maintaining Tango were my job.  Truth be
 told, Tango is already more popular than I expected it would be.
I disagree, because in this instance, nobody asked me for feedback. Instead, Kris asked me to *COMMIT MY SPARE TIME* and *HELP WITH THE DOCUMENTATION*. That's what I said no to. I did not say no to giving feedback. If you want to make the tool analogy, I'm not even using the damn tool! Instead, I looked at it, said "I don't think I'll be using it", and then the tool designer said "So help me improve it a bit", so I said "I ain't got time, mate, sorry". End of analogy. If you guys are trying to make me feel guilty about this, it's not going to work. If you don't like my analogies - fine! But for crying out loud do we really have to spend several zillion posts trying to argue about whether or not the analogy works? I was just trying to explain why I said no, that's all. I didn't realise doing so was going to cause so much grief.
Well, actually you have been ranting about Tango (i.e.: Tango developers not following the D Style Guide, not trying to be anyhow compatible with Phobos and especially your phrase about the development of Tango: "I wish they hadn't done that"). You didn't quite make a valid point why you don't like Tango (besides the style, which has its [well thought through] reason). That's ok, but giving constructive critique would have been a better way to spend time - as opposed to ranting -, which is the whole point of this discussion, I think.
Don't feed the troll! BA
Sep 17 2007
parent Regan Heath <regan netmail.co.nz> writes:
Brad Anderson wrote:
 Alexander Panek wrote:
 Janice Caron wrote:
 On 9/17/07, Sean Kelly <sean f4.ca> wrote:
 A more accurate analogy still, however, is to compare a software library
 to a tool.  In the construction trades I believe you'll find that
 complex tools are often customized by the user and craftsmen often even
 submit feedback to tool designers in an attempt to improve the
 suitability of tools for the work involved.  Spare time typically isn't
 an issue because the time spent is a part of work, not leisure.  In
 fact, some of Tango's users are actually involved in commercial
 projects.  I only wish I had the time to respond to their requests and
 bug reports that I would if maintaining Tango were my job.  Truth be
 told, Tango is already more popular than I expected it would be.
I disagree, because in this instance, nobody asked me for feedback. Instead, Kris asked me to *COMMIT MY SPARE TIME* and *HELP WITH THE DOCUMENTATION*. That's what I said no to. I did not say no to giving feedback. If you want to make the tool analogy, I'm not even using the damn tool! Instead, I looked at it, said "I don't think I'll be using it", and then the tool designer said "So help me improve it a bit", so I said "I ain't got time, mate, sorry". End of analogy. If you guys are trying to make me feel guilty about this, it's not going to work. If you don't like my analogies - fine! But for crying out loud do we really have to spend several zillion posts trying to argue about whether or not the analogy works? I was just trying to explain why I said no, that's all. I didn't realise doing so was going to cause so much grief.
Well, actually you have been ranting about Tango (i.e.: Tango developers not following the D Style Guide, not trying to be anyhow compatible with Phobos and especially your phrase about the development of Tango: "I wish they hadn't done that"). You didn't quite make a valid point why you don't like Tango (besides the style, which has its [well thought through] reason). That's ok, but giving constructive critique would have been a better way to spend time - as opposed to ranting -, which is the whole point of this discussion, I think.
Don't feed the troll!
That's unfair IMO. I reckon this thread has lived long enough, it should just die right about here. Regan
Sep 17 2007
prev sibling next sibling parent Sean Kelly <sean f4.ca> writes:
Janice Caron wrote:
 
 If you guys are trying to make me feel guilty about this, it's not
 going to work. If you don't like my analogies - fine! But for crying
 out loud do we really have to spend several zillion posts trying to
 argue about whether or not the analogy works? I was just trying to
 explain why I said no, that's all. I didn't realise doing so was going
 to cause so much grief.
I'm not trying anything. I simply checked mail this morning, was staggered to see 143 new messages in this group, and replied to the first one I read. I don't know what the rest of the dialog contains (and it's so long I'll probably just skip it), but I don't believe I've done anything to warrant such a reaction from you. As far as I'm concerned, if you don't want to use Tango or contribute to the project or whatever, that's fine with me. Sean
Sep 17 2007
prev sibling parent reply Paolo Invernizzi <arathorn NO_SPAMfastwebnet.it> writes:
I've a strange deja vu... I'm the only one?

Paolo

Janice Caron wrote:

 If you guys are trying to make me feel guilty about this, it's not
 going to work. If you don't like my analogies - fine! But for crying
 out loud do we really have to spend several zillion posts trying to
 argue about whether or not the analogy works? I was just trying to
 explain why I said no, that's all. I didn't realise doing so was going
 to cause so much grief.
Sep 18 2007
parent kris <foo bar.com> writes:
Paolo Invernizzi wrote:
 I've a strange deja vu... I'm the only one?
 
 Paolo
no :)
Sep 18 2007
prev sibling parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
Janice Caron wrote:
 On 9/16/07, kris <foo bar.com> wrote:
 I don't consider the D Style Guide by Walter Bright to be a "minor
 stylistic suggestion", I consider it to be part of the D
 specificiation.
 
 http://digitalmars.com/d/dstyle.html
 
It's just a list of stylistic choices Walter prefers. Nothing more nothing less. "The D Style ... is purely cosmetic and a matter of choice." One thing you'll find out about Walter is that while he's great at writing compilers, he's actually not a very active D user (the compiler is written in C++), and not much of a software engineering guy in general. He's a nuts and bolts kind of guy. I'm not actually too familiar with his style recommendations, but he's not the first guy I'd go to for advice about coding style. --bb
Sep 16 2007
parent reply Christopher Wright <dhasenan gmail.com> writes:
Bill Baxter wrote:
 Janice Caron wrote:
 On 9/16/07, kris <foo bar.com> wrote:
 I don't consider the D Style Guide by Walter Bright to be a "minor
 stylistic suggestion", I consider it to be part of the D
 specificiation.

 http://digitalmars.com/d/dstyle.html
It's just a list of stylistic choices Walter prefers. Nothing more nothing less. "The D Style ... is purely cosmetic and a matter of choice." One thing you'll find out about Walter is that while he's great at writing compilers, he's actually not a very active D user (the compiler is written in C++), and not much of a software engineering guy in general. He's a nuts and bolts kind of guy. I'm not actually too familiar with his style recommendations, but he's not the first guy I'd go to for advice about coding style.
On the other hand: module tango.io.stdout; public import tango.io.Stdout; Not too difficult, hrm? And that can also be a method to access more Phobos-esque interfaces to Tango functionality -- tango.io.stdout could include a writefln implementation, a wrapper around Cout or Stdout. If I wrote such, would the Tango project accept it? (Provided it was well tested and well written.)
Sep 16 2007
parent reply "Janice Caron" <caron800 googlemail.com> writes:
On 9/16/07, Christopher Wright <dhasenan gmail.com> wrote:
 On the other hand:

 module tango.io.stdout;
 public import tango.io.Stdout;

 Not too difficult, hrm?
On Windows, stdout.d and Stdout.d would be the same file!
Sep 16 2007
parent reply Christopher Wright <dhasenan gmail.com> writes:
Janice Caron wrote:
 On 9/16/07, Christopher Wright <dhasenan gmail.com> wrote:
 On the other hand:

 module tango.io.stdout;
 public import tango.io.Stdout;

 Not too difficult, hrm?
On Windows, stdout.d and Stdout.d would be the same file!
Ach, who cares about Windows support? :)
Sep 16 2007
parent reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Christopher Wright wrote:

 On Windows, stdout.d and Stdout.d would be the same file!
Ach, who cares about Windows support? :)
stdout.d and Stdout.d are the same file on Mac OS X too... --anders
Sep 16 2007
parent reply Christopher Wright <dhasenan gmail.com> writes:
Anders F Björklund wrote:
 Christopher Wright wrote:
 
 On Windows, stdout.d and Stdout.d would be the same file!
Ach, who cares about Windows support? :)
stdout.d and Stdout.d are the same file on Mac OS X too... --anders
That's configurable.
Sep 16 2007
parent reply Bruce Adams <tortoise_74 yeah.who.co.uk> writes:
Christopher Wright Wrote:

 Anders F Björklund wrote:
 Christopher Wright wrote:
 
 On Windows, stdout.d and Stdout.d would be the same file!
Ach, who cares about Windows support? :)
stdout.d and Stdout.d are the same file on Mac OS X too... --anders
That's configurable.
Strictly speaking its configurable on linux too. Just use a case insensitive file system like NTFS. In the linux case its also bonkers. In case it wasn't obvious I think the point was that distinguishing module names using case alone is a bad idea. Especially, if you want to be portable. Either qualify the names or put them in a different sub-directory / namespace.
Sep 17 2007
parent reply "Stewart Gordon" <smjg_1998 yahoo.com> writes:
"Bruce Adams" <tortoise_74 yeah.who.co.uk> wrote in message 
news:fclbdv$1ih5$1 digitalmars.com...
<snip>
 Strictly speaking its configurable on linux too.  Just use a case
 insensitive file system like NTFS.  In the linux case its also
 bonkers.  In case it wasn't obvious I think the point was that
 distinguishing module names using case alone is a bad idea.
 Especially, if you want to be portable.  Either qualify the names
 or put them in a different sub-directory / namespace.
Unless obfuscation is your goal, in 99% of cases you shouldn't distinguish the names of things by case alone anyway. See the example here: http://www.rinkworks.com/stupid/cs_programming.shtml Stewart.
Sep 17 2007
parent Alexander Panek <alexander.panek brainsware.org> writes:
Stewart Gordon wrote:
 "Bruce Adams" <tortoise_74 yeah.who.co.uk> wrote in message 
 news:fclbdv$1ih5$1 digitalmars.com...
 <snip>
 Strictly speaking its configurable on linux too.  Just use a case
 insensitive file system like NTFS.  In the linux case its also
 bonkers.  In case it wasn't obvious I think the point was that
 distinguishing module names using case alone is a bad idea.
 Especially, if you want to be portable.  Either qualify the names
 or put them in a different sub-directory / namespace.
Unless obfuscation is your goal, in 99% of cases you shouldn't distinguish the names of things by case alone anyway. See the example here: http://www.rinkworks.com/stupid/cs_programming.shtml Stewart.
Tango uses uppercase modules for D modules, and lowercase modules for C modules, to explicitely state "This is C binding code". It's just cosmetic [, but consistent, which is good].
Sep 17 2007
prev sibling parent reply Lutger <lutger.blijdestijn gmail.com> writes:
kris wrote:
 Yes, the doc could be better overall. Some of it is just awesome, whilst 
 some of it kinda sucks (my writing skills, for example). 
[OT] No, your writing skills don't suck at all, but I think you did place the bar a bit high with that io chapter. Mainly by assuming readers are familiar with this kind of terminology.
Sep 16 2007
parent reply kris <foo bar.com> writes:
Lutger wrote:
 kris wrote:
 Yes, the doc could be better overall. Some of it is just awesome, 
 whilst some of it kinda sucks (my writing skills, for example). 
[OT] No, your writing skills don't suck at all, but I think you did place the bar a bit high with that io chapter. Mainly by assuming readers are familiar with this kind of terminology.
OK, thank you. We'll get that fixed :)
Sep 16 2007
parent reply Matti Niemenmaa <see_signature for.real.address> writes:
kris wrote:
 Lutger wrote:
 kris wrote:
 Yes, the doc could be better overall. Some of it is just awesome,
 whilst some of it kinda sucks (my writing skills, for example). 
[OT] No, your writing skills don't suck at all, but I think you did place the bar a bit high with that io chapter. Mainly by assuming readers are familiar with this kind of terminology.
OK, thank you. We'll get that fixed :)
I agree. In particular because Tango uses different terminology than just about all other languages/libraries (streams vs conduits, almost everything is a buffer instead of the stream doing the buffering), the I/O chapter should start from the very basics and have useful examples. It took me a long time to figure out the idioms around Tango I/O to the point that I could write generic I/O code for a library, for example. For the C++ STL, use std::istream and std::ostream. For Phobos, use std.stream.InputStream and OutputStream. After reading the (original version of the) Tango reference manual, I had no clue. "Conduits, presumably, but what about Buffers? Do they need separate support, or should I just take the Conduit the Buffer is wrapped around? But won't that bypass the buffering?" Things like that. Of course, it helps that the system has undergone a few redesigns in its short life (the additions of InputStream + OutputStream, for instance). The reference manual seems to have improved, too. There's still some stuff I don't quite get, though. For instance, IConduit and IBuffer: everything seems to inherit from Conduit or Buffer, so why have the basic interfaces? Expanding on the reasons behind the whole design (and the terminology) might be a good idea. -- E-mail address: matti.niemenmaa+news, domain is iki (DOT) fi
Sep 16 2007
parent reply kris <foo bar.com> writes:
Matti Niemenmaa wrote:
 kris wrote:
 Lutger wrote:
 kris wrote:
 Yes, the doc could be better overall. Some of it is just awesome,
 whilst some of it kinda sucks (my writing skills, for example). 
[OT] No, your writing skills don't suck at all, but I think you did place the bar a bit high with that io chapter. Mainly by assuming readers are familiar with this kind of terminology.
OK, thank you. We'll get that fixed :)
I agree. In particular because Tango uses different terminology than just about all other languages/libraries (streams vs conduits, almost everything is a buffer instead of the stream doing the buffering), the I/O chapter should start from the very basics and have useful examples. It took me a long time to figure out the idioms around Tango I/O to the point that I could write generic I/O code for a library, for example. For the C++ STL, use std::istream and std::ostream. For Phobos, use std.stream.InputStream and OutputStream. After reading the (original version of the) Tango reference manual, I had no clue. "Conduits, presumably, but what about Buffers? Do they need separate support, or should I just take the Conduit the Buffer is wrapped around? But won't that bypass the buffering?" Things like that.
All good points. This is partly why we're always asking for help with the doc (in each release announcement)
 Of course, it helps that the system has undergone a few redesigns in its short
 life (the additions of InputStream + OutputStream, for instance). The reference
 manual seems to have improved, too.
Glad to hear there's been some progress
 There's still some stuff I don't quite get, though. For instance, IConduit and
 IBuffer: everything seems to inherit from Conduit or Buffer, so why have the
 basic interfaces? Expanding on the reasons behind the whole design (and the
 terminology) might be a good idea.
Tango often uses interfaces to decouple implementation: you can operate via an interface (handed to you as an argument) without importing any concrete implementation. In a library of any size, this really helps to avoid tight- or cross-coupling. It means, for example, that other (more traditional) interfaces can rely on remaining 'pure', in that they only ever import other interfaces and not some specific implementation code. We once looked at removing IConduit and IBuffer, but decided they were just too useful. We're quite picky about introducing interfaces, though ... don't wish to overuse use them.
Sep 16 2007
parent reply Matti Niemenmaa <see_signature for.real.address> writes:
kris wrote:
 Matti Niemenmaa wrote:
 There's still some stuff I don't quite get, though. For instance, IConduit 
 and IBuffer: everything seems to inherit from Conduit or Buffer, so why 
 have the basic interfaces? Expanding on the reasons behind the whole design
 (and the terminology) might be a good idea.
Tango often uses interfaces to decouple implementation: you can operate via an interface (handed to you as an argument) without importing any concrete implementation. In a library of any size, this really helps to avoid tight- or cross-coupling. It means, for example, that other (more traditional) interfaces can rely on remaining 'pure', in that they only ever import other interfaces and not some specific implementation code.
Great, now go and put that in the manual! (Unless it's already there somewhere and I missed it.) -- E-mail address: matti.niemenmaa+news, domain is iki (DOT) fi
Sep 16 2007
parent reply kris <foo bar.com> writes:
Matti Niemenmaa wrote:
 kris wrote:
 Matti Niemenmaa wrote:
 There's still some stuff I don't quite get, though. For instance, IConduit 
 and IBuffer: everything seems to inherit from Conduit or Buffer, so why 
 have the basic interfaces? Expanding on the reasons behind the whole design
 (and the terminology) might be a good idea.
Tango often uses interfaces to decouple implementation: you can operate via an interface (handed to you as an argument) without importing any concrete implementation. In a library of any size, this really helps to avoid tight- or cross-coupling. It means, for example, that other (more traditional) interfaces can rely on remaining 'pure', in that they only ever import other interfaces and not some specific implementation code.
Great, now go and put that in the manual! (Unless it's already there somewhere and I missed it.)
Hey, it's a Wiki ... *you* can add it too! :-D
Sep 16 2007
parent reply Matti Niemenmaa <see_signature for.real.address> writes:
kris wrote:
 Hey, it's a Wiki ... *you* can add it too! :-D
Actually, I'm not one of those few who have edit rights, so I can't. Good try though. ;-) -- E-mail address: matti.niemenmaa+news, domain is iki (DOT) fi
Sep 16 2007
parent kris <foo bar.com> writes:
Matti Niemenmaa wrote:
 kris wrote:
 Hey, it's a Wiki ... *you* can add it too! :-D
Actually, I'm not one of those few who have edit rights, so I can't. Good try though. ;-)
Oh, how thoughtless of us! You now have edit-rights, Matti O_o :)
Sep 16 2007
prev sibling parent Lars Ivar Igesund <larsivar igesund.net> writes:
Janice Caron wrote:

 
 So I apologise if my first impression offended you, but yes, I was
 being honest. Perhaps I might have a different opinion if you could
 answer the following question: Why did you violate the D style guide?
How on earth can we violate a style _guide_ that was never discussed, only one day put up on the web page by Walter as "This is the D style guide", long after people had written thousands of lines of code in other styles? And the fact that it says itself that is a guide only, not a requirement, to boot? The D style guide is mostly tuned towards single level hierarchies, and free function API's, something being (IMO) rather too little in a multi paradigm language like D. Tango's style guide tries to take into account those things that are relevant for a complete, consistent and extensible library design, and most class names and methods are subject to discussions before decided upon. -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Sep 16 2007
prev sibling parent reply Matti Niemenmaa <see_signature for.real.address> writes:
Sean Kelly wrote:
 Janice Caron wrote:
 And what's with the .newline? Isn't "\n" supposed to translate to the
 platform-specific linebreak convention? Besides, it looks weird,
 having the newline specified differently from all the other bits of
 output.
You're free to use "\n" as well--it works in all the cases I've tried. The .newline method is similar to std::endl in C++.
"\n" doesn't translate to "\r\n" on Windows, .newline does. (Also, .newline flushes, but that's beside the point.) -- E-mail address: matti.niemenmaa+news, domain is iki (DOT) fi
Sep 16 2007
next sibling parent reply "Janice Caron" <caron800 googlemail.com> writes:
On 9/16/07, Matti Niemenmaa <see_signature for.real.address> wrote:
 "\n" doesn't translate to "\r\n" on Windows, .newline does.
Sorry to disagree, but writef("hello\nworld\n"); works just fine on Windows. Obviously something's going on under the hood, but I honestly don't care what it is. I only care that it works.
Sep 16 2007
parent reply Matti Niemenmaa <see_signature for.real.address> writes:
Janice Caron wrote:
 On 9/16/07, Matti Niemenmaa <see_signature for.real.address> wrote:
 "\n" doesn't translate to "\r\n" on Windows, .newline does.
Sorry to disagree, but writef("hello\nworld\n"); works just fine on Windows. Obviously something's going on under the hood, but I honestly don't care what it is. I only care that it works.
Sorry, I meant in Tango. Phobos does the translation, as you say. -- E-mail address: matti.niemenmaa+news, domain is iki (DOT) fi
Sep 16 2007
parent reply kris <foo bar.com> writes:
Matti Niemenmaa wrote:
 Sorry, I meant in Tango. Phobos does the translation, as you say.
Please write a ticket, Matti? http://www.dsource.org/projects/tango/newticket
Sep 16 2007
next sibling parent reply Matti Niemenmaa <see_signature for.real.address> writes:
kris wrote:
 Matti Niemenmaa wrote:
 Sorry, I meant in Tango. Phobos does the translation, as you say.
Please write a ticket, Matti? http://www.dsource.org/projects/tango/newticket
I did, 7 months ago, and this behaviour was a conscious choice on your part :-) http://www.dsource.org/projects/tango/ticket/295 -- E-mail address: matti.niemenmaa+news, domain is iki (DOT) fi
Sep 16 2007
parent reply kris <foo bar.com> writes:
Matti Niemenmaa wrote:
 kris wrote:
 Matti Niemenmaa wrote:
 Sorry, I meant in Tango. Phobos does the translation, as you say.
Please write a ticket, Matti? http://www.dsource.org/projects/tango/newticket
I did, 7 months ago, and this behaviour was a conscious choice on your part :-) http://www.dsource.org/projects/tango/ticket/295
Mea Culpa!! Well, things change, and at least part of it was fixed :p I'll open it again, and thank you ... you've written lots of tickets
Sep 16 2007
parent reply Matti Niemenmaa <see_signature for.real.address> writes:
kris wrote:
 Matti Niemenmaa wrote:
 kris wrote:
 Matti Niemenmaa wrote:
 Sorry, I meant in Tango. Phobos does the translation, as you say.
Please write a ticket, Matti? http://www.dsource.org/projects/tango/newticket
I did, 7 months ago, and this behaviour was a conscious choice on your part :-) http://www.dsource.org/projects/tango/ticket/295
Mea Culpa!! Well, things change, and at least part of it was fixed :p I'll open it again, and thank you ... you've written lots of tickets
No problem. It would be really nice if it was changed: - It's a lot quicker to write \n than .newline, even on a Scandinavian keyboard where \ is Alt Gr-+. :-) - It's especially annoying when you have stuff like 'Stdout("foo").newline.print("bar")', where you have to use .print. You can't do 'Stdout("foo\nbar")' because \n isn't \r\n on Windows, and you can't use 'Stdout("foo").newline("bar")' because newline doesn't take arguments. - Replacing Stdout("foo bar") to use a newline instead of a space requires a lot of typing. Any particular reason why you didn't see a reason to change it then, and do now? -- E-mail address: matti.niemenmaa+news, domain is iki (DOT) fi
Sep 16 2007
parent reply kris <foo bar.com> writes:
Matti Niemenmaa wrote:
 kris wrote:
 I'll open it again, and thank you ... you've written lots of tickets
No problem. Any particular reason why you didn't see a reason to change it then, and do now?
Yeah, the issue is that we want to avoid scanning every string argument, for every Layout instance, just to find one 'special' character. In other words, Tango formatting does not do a char-by-char output. Instead, it does a char[] slice by char[] slice, which is more efficient for a number of reasons. Note that the Win32 console handles it just fine as it is. At least, There's never been any indication that it doesn't work in the past. Perhaps you're redirecting console output to a file, and expecting to see \r\n in there instead of a \n? One way to deal with this is to (selectively/optionally) inject an output-filter on the Console stream to do the scanning/translation. That would at least provide a choice for those who don't want/need this? We don't /really/ want to do this now any more than before (cos' it's a special case), but at least there's (finally!) an effective mechanism for making it optional. See, embedding the scan within the Console itself would slow it down considerably; we've got other people yelling at us to ensure the console screams along instead when redirecting (it's apparently twice as fast as the C console on input, and probably more so on output nowadays since we fixed the 'autoflush' issue). Stream filters are just cool anyway, and you /could/ use them to *dynamically* switch the behavior to produce Mac or *nix newlines instead. Worth considering? Oh, and the .print/.newline thing you ran into is just a weird thing with D. It's a bit annoying, and I can see why you'd want '\n' for that keyboard - Kris
Sep 16 2007
parent reply Matti Niemenmaa <see_signature for.real.address> writes:
kris wrote:
 In other words, Tango formatting does not do a char-by-char output. Instead,
 it does a char[] slice by char[] slice, which is more efficient for a number
 of reasons.
Ah yes, good point. Phobos does it one dchar at a time, which allows it to do things the way it does.
 Perhaps you're redirecting console output to a file, and expecting to see
 \r\n in there instead of a \n?
Yes. Personally, I don't care that much, but it can be necessary for interoperability reasons, which is why I now tend to use .newline "just in case" anyway.
 Stream filters are just cool anyway, and you /could/ use them to 
 *dynamically* switch the behavior to produce Mac or *nix newlines instead. 
 Worth considering?
Sure!
 Oh, and the .print/.newline thing you ran into is just a weird thing with D. 
Yeah, I know, but it makes sense, because it would be ambiguous otherwise. I suppose I could do '(Stdout("foo").newline)("bar").newline' or something, but that's too ugly and even more annoying to type than .print. :-) A thought: would it be possible to have an overload like: typeof(this) newline(T[] s) { this.newline.print(s); } Unless that raises arcane compilation problems it should be helpful, no? -- E-mail address: matti.niemenmaa+news, domain is iki (DOT) fi
Sep 16 2007
parent reply Naryl <cy ngs.ru> writes:
On Sun, 16 Sep 2007 17:20:45 +0400, Matti Niemenmaa  
<see_signature for.real.address> wrote:

 suppose I could do '(Stdout("foo").newline)("bar").newline'
'Stdout("foo").newline()("bar")' works -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Sep 16 2007
next sibling parent Matti Niemenmaa <see_signature for.real.address> writes:
Naryl wrote:
 On Sun, 16 Sep 2007 17:20:45 +0400, Matti Niemenmaa
 <see_signature for.real.address> wrote:
 
 suppose I could do '(Stdout("foo").newline)("bar").newline'
'Stdout("foo").newline()("bar")' works
*slaps head* Duh!! I've got so used to the D syntax of calling members without brackets that I forgot you can do it /with/ the brackets as well. Thanks, that's good to keep in mind. ;-) -- E-mail address: matti.niemenmaa+news, domain is iki (DOT) fi
Sep 16 2007
prev sibling parent reply Derek Parnell <derek psych.ward> writes:
On Sun, 16 Sep 2007 21:11:25 +0400, Naryl wrote:

 On Sun, 16 Sep 2007 17:20:45 +0400, Matti Niemenmaa  
 <see_signature for.real.address> wrote:
 
 suppose I could do '(Stdout("foo").newline)("bar").newline'
'Stdout("foo").newline()("bar")' works
Would is be posible to make Stdout work like this ... Stdout("foo", "{n}", "bar"); where {n} is the special formatting token whose functionality is the same as .newline. Or maybe using an enum... Stdout("foo", FC.nl, "bar"); ... just thinking out loud ... -- Derek Parnell Melbourne, Australia skype: derek.j.parnell
Sep 16 2007
parent reply kris <foo bar.com> writes:
Derek Parnell wrote:
 Would is be posible to make Stdout work like this ...
 
   Stdout("foo", "{n}", "bar");
 
 where {n} is the special formatting token whose functionality is the same
 as .newline.
Yes, it would. Except it might perhaps be Stdout.format ("blah{n}"...) ?
Sep 16 2007
parent reply Christopher Wright <dhasenan gmail.com> writes:
kris wrote:
 Derek Parnell wrote:
 Would is be posible to make Stdout work like this ...

   Stdout("foo", "{n}", "bar");

 where {n} is the special formatting token whose functionality is the same
 as .newline.
Yes, it would. Except it might perhaps be Stdout.format ("blah{n}"...) ?
And considering the arrangement of Tango, that would standardize newline formatting a fair bit -- you'd have to add it to tango.text.convert.Layout, so it'd be available everywhere. Looking at the code, it seems that Stdout supports varargs already. Alas, recursion is not used, so only a fixed number of arguments is allowed -- I just tried running it with 26 arguments and got a segfault. Let me see if I can fix that.
Sep 16 2007
parent kris <foo bar.com> writes:
Christopher Wright wrote:
 kris wrote:
 Derek Parnell wrote:
 Would is be posible to make Stdout work like this ...

   Stdout("foo", "{n}", "bar");

 where {n} is the special formatting token whose functionality is the 
 same
 as .newline.
Yes, it would. Except it might perhaps be Stdout.format ("blah{n}"...) ?
And considering the arrangement of Tango, that would standardize newline formatting a fair bit -- you'd have to add it to tango.text.convert.Layout, so it'd be available everywhere.
Aye
 Looking at the code, it seems that Stdout supports varargs already. 
It always did. Long, long before the first release in January :) Anyway, FWIW, here's the distinction between those two: Stdout() is a shortcut, where you just want to dump some output to the console. Unlike Stdout.format() it does not support a format-string. Instead, it just emits a comma-separated list of the arguments, because that's how you type them: # Stdout (10, "foo", 20) => "10, foo, 20" It does this via a little lookup table, and there's a limited number of patterns supplied. Stdout.format() is different only in that 'you' supply the formatting arrangement.
 Alas, recursion is not used, so only a fixed number of arguments is 
 allowed -- I just tried running it with 26 arguments and got a segfault. 
Ach! Do I detect the scent of a new Ticket? :D
Sep 16 2007
prev sibling parent reply Robert Fraser <fraserofthenight gmail.com> writes:
Bill Baxter Wrote:

 Janice Caron wrote:
 On 9/16/07, kris <foo bar.com> wrote:
 I don't consider the D Style Guide by Walter Bright to be a "minor
 stylistic suggestion", I consider it to be part of the D
 specificiation.
 
 http://digitalmars.com/d/dstyle.html
 
It's just a list of stylistic choices Walter prefers. Nothing more nothing less. "The D Style ... is purely cosmetic and a matter of choice." One thing you'll find out about Walter is that while he's great at writing compilers, he's actually not a very active D user (the compiler is written in C++), and not much of a software engineering guy in general. He's a nuts and bolts kind of guy. I'm not actually too familiar with his style recommendations, but he's not the first guy I'd go to for advice about coding style. --bb
Try reading the DMD source code some time if you're ever in the mood for a short horror film. You'd better be a big fan of "goto" and not a fan of indentation. Then, if you're not huddling under the bedcovers yet, check out Descent's Java port of it. But the code is fast and works well, so, hey, nothing wrong with that ;-P!
Sep 16 2007
next sibling parent BCS <ao pathlink.com> writes:
Reply to Robert,

 Bill Baxter Wrote:
 
 Janice Caron wrote:
 
 On 9/16/07, kris <foo bar.com> wrote:
 
 I don't consider the D Style Guide by Walter Bright to be a "minor
 stylistic suggestion", I consider it to be part of the D
 specificiation.
 
 http://digitalmars.com/d/dstyle.html
 
It's just a list of stylistic choices Walter prefers. Nothing more nothing less. "The D Style ... is purely cosmetic and a matter of choice." One thing you'll find out about Walter is that while he's great at writing compilers, he's actually not a very active D user (the compiler is written in C++), and not much of a software engineering guy in general. He's a nuts and bolts kind of guy. I'm not actually too familiar with his style recommendations, but he's not the first guy I'd go to for advice about coding style. --bb
Try reading the DMD source code some time if you're ever in the mood for a short horror film. You'd better be a big fan of "goto" and not a fan of indentation. Then, if you're not huddling under the bedcovers yet, check out Descent's Java port of it. But the code is fast and works well, so, hey, nothing wrong with that ;-P!
That reminds me of the story of Outlook (Yes MS's app). It started out life as a really nice architected, multi-threaded, modular, OOed, clean, wonderful program that took 5 minutes to load a e-mail. After a few months of work to get that down, it was shipped as as a vary "Practical" code base that was the de facto stress test for Visual Studio (you need 7 MB of actual code in one DLL?!) I think there is an inverse relation between fast and clean code. Really nice code is kinda slow. Really fast code is kinda ugly.
Sep 16 2007
prev sibling parent torhu <no spam.invalid> writes:
Robert Fraser wrote:
 Try reading the DMD source code some time if you're ever in the mood for a
short horror film. You'd better be a big fan of "goto" and not a fan of
indentation. Then, if you're not huddling under the bedcovers yet, check out
Descent's Java port of it.
Walter uses tabs of size 8, and he mixes spaces and tabs. So if your tab size is set to 4 spaces, it looks like he doesn't indent much.
 
 But the code is fast and works well, so, hey, nothing wrong with that ;-P!
 
Sep 16 2007
prev sibling next sibling parent kris <foo bar.com> writes:
Matti Niemenmaa wrote:

 (Also, .newline flushes, but that's beside the point.)
(.newline flushes only when not redirected)
Sep 16 2007
prev sibling parent Sean Kelly <sean f4.ca> writes:
Matti Niemenmaa wrote:
 Sean Kelly wrote:
 Janice Caron wrote:
 And what's with the .newline? Isn't "\n" supposed to translate to the
 platform-specific linebreak convention? Besides, it looks weird,
 having the newline specified differently from all the other bits of
 output.
You're free to use "\n" as well--it works in all the cases I've tried. The .newline method is similar to std::endl in C++.
"\n" doesn't translate to "\r\n" on Windows, .newline does.
Yup. This doesn't matter for console output, but it might matter for file output. YMMV.
 (Also, .newline flushes, but that's beside the point.)
Not always :-) .newline doesn't flush if the output is to a console and is not redirected, I believe. It's been somewhat difficult to find a good balance between performance and logical behavior there, and the current behavior is the best compromise between the two that we've been able to come up with. Sean
Sep 17 2007
prev sibling next sibling parent Bill Baxter <dnewsgroup billbaxter.com> writes:
Janice Caron wrote:
 On 9/15/07, TomD <t_demmer_no_spam_ web.de> wrote:
 What really worries me is the total absence of Walter in this discussion. I
had another look at Tango and again came to the result I do not like it. It
would really be a pity seeing Phobos going down the drain.
I had not looked at Tango before this discussion, but now that I have, I have to say I don't like it either. It's not the functionality that irks me, it's the /style/. I mean: import tango.io.Stdout; Stdout( i )( " = " )( s ).newline;
That's not the only way to do output with Tango. I don't recall the exact syntax, but there's another syntax that lets you do the format string style somethinsomethin.("{} = {}\n", i,s)
 Module names in mixed case!? Did the Tango folk not read the D style
 guide where it says "Module and package names are all lower case, and
 only contain the characters [a..z][0..9][_]", or did they just
 purposefully decide to avoid it? If the former, that was amateurish;
 if the latter, it was petty.
I don't know if there was any good reason for it, but it looks like a Java influence to me.
 Function names in mixed case? I assume Stdout is a function. Phobos
 has function names in lower case, and that's how I like them.
Stdout is a class instance, actually. Akin to cout in C++. 'course instances are usually written lower case too...
 Currying parameters? (That's the malarky with the brackets). What's
 wrong with variadic arguments?
It actually just chaining, not currying. Stdout( foo ) returns 'this', just like C++'s iostream's operator<< does.
 And what's with the .newline? Isn't "\n" supposed to translate to the
 platform-specific linebreak convention? Besides, it looks weird,
 having the newline specified differently from all the other bits of
 output.
I don't know but my guess would be it flushes in addition to printing a newline (like C++ endl)... and checking the source, yep. That's what it does.
 I was happy with:
 
 import std.stdio;
 writefln(i," = ",s);
 
 I still am. I don't see that changing any time soon.
Yep. I like it too. Works most of the time. But it gets you into trouble if 's' contains format sequences (like "%s", "%d", etc).
 Granted, Tango has extra functionality, but why not just provide that
 as add-ons to Phobos, using the same style and naming conventions?
I think there's a strong C#/Java-using contingent among the Tango developers. I believe that had a lot of influence on the style of Tango. Anyway, these folks have put an enormous amount of their free time into putting together and maintaining a decent library that presumably matches *their ideal* of what a library should look like. They're the ones doing the work, so they get to decide on the style and conventions used. Simple as that. --bb
Sep 15 2007
prev sibling parent kris <foo bar.com> writes:
Janice Caron wrote:
 On 9/15/07, TomD <t_demmer_no_spam_ web.de> wrote:
 What really worries me is the total absence of Walter in this discussion. I
had another look at Tango and again came to the result I do not like it. It
would really be a pity seeing Phobos going down the drain.
I had not looked at Tango before this discussion, but now that I have, I have to say I don't like it either. It's not the functionality that irks me, it's the /style/. I mean: import tango.io.Stdout; Stdout( i )( " = " )( s ).newline;
If we had a penny for every time ... # Stdout.formatln ("{} = {}", i, s);
Sep 15 2007
prev sibling parent reply renoX <renosky free.fr> writes:
TomD a écrit :
 Anders F Björklund Wrote:
 [...]
 The same can be said for DMD... Fortunately both are open source ?
:-)
 Patches to Phobos can go into GDC, just like compiler patches can.
 
well, the last thing we need is just another fork. What really worries me is the total absence of Walter in this discussion. I had another look at Tango and again came to the result I do not like it. It would really be a pity seeing Phobos going down the drain. Ciao Tom
Well you're not alone in not liking Tango: I find quite strange that for example they imitated C++ streams which isn't a very successful feature of C++: I've worked on quite a few C++ projects and each time people used printf instead of C++ streams.. That said, Tango's 'wideness' is interesting, Phobos is really too small.. renoX
Sep 15 2007
parent reply kris <foo bar.com> writes:
renoX wrote:
 Well you're not alone in not liking Tango: I find quite strange that for 
 example they imitated C++ streams which isn't a very successful feature 
 of C++: I've worked on quite a few C++ projects and each time people 
 used printf instead of C++ streams..
C++ streams? Please explain? Are you talking about call-chaining? If so, and you don't like it, then use Stdout.formatln() instead?
 
 That said, Tango's 'wideness' is interesting, Phobos is really too small..
It's odd (and frustrating) how people wind up focusing on one or two 'stylistic' things about Tango, and go ballistic over that, rather than taking a closer look. Happy to hear that you have personally taken that latter step.
Sep 15 2007
parent reply TomD <t_demmer_no_spam_ web.de> writes:
kris Wrote:
[...]
 It's odd (and frustrating) how people wind up focusing on one or two 
 'stylistic' things about Tango, and go ballistic over that, rather than 
 taking a closer look. Happy to hear that you have personally taken that 
 latter step.
Sorry for frustrating you...but I guess Janice and I made our point not very clear. My first contact with Tango was around January, February this year, when it was about to be moved to dsource. Lacking a decent debugger for D, console output is extremely important. Looking at the Tango manual chapter I read about "conduits", a word I had to look up in the dictionary in the first place. Leo tells me it is just another word for "pipe". Lots of lines about concepts, buffers, file handling, but not a single line how I actually can output anything to the console. What I find extremely useful are a couple of (simple) examples, this is how it looks like, maybe a link to a comprehensive summary table, and now to the gory details. How do I output a string, an int, a float? How do I read them back in? OK, it looks like this, how do I change the formatting, and why does it look like that? This satisfies the impatient programmer who just wants to look something up, and the interested reader that wants to go into the details. The beauty of Phobos is that it can be seen as a libc wrapper with a couple of extensions (this is not really true, but a good first classification). Familiar ground. The documentation a bit like the FreePascal runtime documentation. Sometimes too terse, but you always feel like you have section 3 of the man pages for the details. Sockets are bad in Phobos? Gee, just look at some C-example and do the same. The point (for me) is that Tango is the newcomer, with a new concept, which needs good points to convince people. And it is not just saying "but look, we have 600 pages of documentation" when it makes me feel, yes, and I need to read all of them before I start. Enough bashing, the tutorials are quite helpful. I hope this was not too offending, at least it was intended to be constructive. Ciao Tom
Sep 16 2007
next sibling parent reply kris <foo bar.com> writes:
TomD wrote:
 kris Wrote:
 [...]
 It's odd (and frustrating) how people wind up focusing on one or two 
 'stylistic' things about Tango, and go ballistic over that, rather than 
 taking a closer look. Happy to hear that you have personally taken that 
 latter step.
 Sorry for frustrating you...but I guess Janice and I made our point
 not very clear. My first contact with Tango was around January, February this
year, when it
 was about to be moved to dsource. Lacking a decent debugger for D, console
output is
 extremely important. Looking at the Tango manual chapter I read about
"conduits", a
 word I had to look up in the dictionary in the first place. Leo tells me it is
just another word 
 for "pipe". Lots of lines about concepts, buffers, file handling, but not a
single line how
 I actually can output anything to the console. 
 
 What I find extremely useful are a couple of (simple)  examples, this is how
it looks
 like, maybe a link to a comprehensive summary table, and now to the gory
details.
 How do I output a string, an int, a float? How do I read them back in?
 OK, it looks like this, how do I change the formatting, and why does it look
like that?
 
 This satisfies the impatient programmer who just wants to look something up,
and the 
 interested reader that wants to go into the details. The beauty of Phobos is
that it can be
 seen as a libc wrapper with a couple of extensions (this is not really true,
but a good first classification). Familiar ground. The documentation a bit like
the FreePascal runtime
 documentation. Sometimes too terse, but you always feel like you have section 3
 of the man pages for the details. Sockets are bad in Phobos? Gee, just look at
some
 C-example and do the same. 
 
 The point (for me) is that Tango is the newcomer, with a new concept, which
needs
 good points to convince people. And it is not just saying "but look, we have
600 pages
 of documentation" when it makes me feel, yes, and I need to read all of them
before
 I start. 
 Enough bashing, the tutorials are quite helpful.
 
 I hope this was not too offending, at least it was intended to be constructive.
 
 Ciao
 Tom
Hey Tom, Thank you, very much! That is so refreshing to hear some *constructive* criticism! You make a number of valuable points: I think your suggestions make an enormous amount of sense, and will be encouraging this to happen as you describe. I wrote the IO chapter, so I know the guilty party there :p
Sep 16 2007
parent reply renoX <renosky free.fr> writes:
kris a écrit :
 That is so refreshing to hear some *constructive* criticism! You make a 
 number of valuable points: I think your suggestions make an enormous 
 amount of sense, and will be encouraging this to happen as you describe. 
 I wrote the IO chapter, so I know the guilty party there :p
Note that the first and main point which started this thread (and many other identical threads) is a 'constructive criticism': we'd like to have Tango and Phobos compatible. renoX
Sep 16 2007
parent kris <foo bar.com> writes:
renoX wrote:
 kris a écrit :
 That is so refreshing to hear some *constructive* criticism! You make 
 a number of valuable points: I think your suggestions make an enormous 
 amount of sense, and will be encouraging this to happen as you 
 describe. I wrote the IO chapter, so I know the guilty party there :p
Note that the first and main point which started this thread (and many other identical threads) is a 'constructive criticism': we'd like to have Tango and Phobos compatible. renoX
Heya RenoX, Do you feel there's some kind of pushback against that notion? If so, I'd dearly like to know where that's coming from? That aside: it's just not as simple as we'd like it to be and, as noted before, it will take time to make that happen. It will happen though, with some give and take. Just try to be patient, please? Just because you don't see us writing about it in the NG doesn't mean it isn't being addressed ;p - Kris
Sep 16 2007
prev sibling parent BCS <ao pathlink.com> writes:
Reply to tomD,

 Sorry for frustrating you...but I guess Janice and I made our point
 not very clear. My first contact with Tango was around January,
 February this year, when it
 was about to be moved to dsource. Lacking a decent debugger for D,
 console output is
 extremely important. Looking at the Tango manual chapter I read about
 "conduits", a
 word I had to look up in the dictionary in the first place. Leo tells
 me it is just another word
 for "pipe". Lots of lines about concepts, buffers, file handling, but
 not a single line how
 I actually can output anything to the console.
This is vary similar to my experience. Tango NEEDS something as simple as writef, both for standard output and for the basic output construct (e.g. Phobos' Stream.writef)
Sep 16 2007
prev sibling parent reply renoX <renosky free.fr> writes:
Bill Baxter a écrit :
 Janice Caron wrote:
 On 9/14/07, simax <simax gmx.net> wrote:

 I haven't used Tango (yet?). But I don't think I'll try it if it means
 I'll have to stop using Phobos. I had originally assumed it was an
 add-on, not a replacement. Is that wrong? Anyway, if it's a
 replacement, that's definitely a disincentive.
Yep, that's what all the hubub is about.
 After all - why rewrite writefln()? It's already there. (...as in, in 
 Phobos).
Better support for localization for one. Tango's routines let you change the order of arguments in the format string, since the grammars of different languages don't always use the same word order. You can say "{1} is {2}" in Tango, in contrast to "%s is %s" of writefln.
Somehow I don't see that requiring me to count where my arguments are as a progress for me. I've already suggested that "%{foo} %{bar}" is much easier to use, too bad this require a mixin currently, waiting for macros.. Regards, renoX
 
 But it's definitely an "if it ain't broke..." kind of situation.  For 
 most folks writefln does what they need with a minimum of fuss.  Heck, 
 Walter seems to still use printf even.
 
 --bb
Sep 15 2007
parent reply "Janice Caron" <caron800 googlemail.com> writes:
On 9/15/07, renoX <renosky free.fr> wrote:
 Somehow I don't see that requiring me to count where my arguments are as
 a progress for me.
It is a very important feature which is /required/ for internationalisation. If you haven't noticed this, it's because you only write programs for an English-speaking audience. (Internationalisation would require a thread all to itself). I'm not a Tango user, but I do understand the need for this. (That's not to say you can't do internationalisation without Tango - you just have to write a parameter reordering function manually).
Sep 15 2007
parent reply renoX <renosky free.fr> writes:
Janice Caron a écrit :
 On 9/15/07, renoX <renosky free.fr> wrote:
 Somehow I don't see that requiring me to count where my arguments are as
 a progress for me.
It is a very important feature which is /required/ for internationalisation. If you haven't noticed this, it's because you only write programs for an English-speaking audience. (Internationalisation would require a thread all to itself).
Well you didn't look at my solution. I agree that different translations must be able to put the variable in the order they want, but my solution is to put the variable name inside the format string which is much better than counting. So instead of having "Prenom {0}, Nom {1}", firsname, name" you would have "Prenom %{firstname} Name %{name}". Unfortunately, unless you want to use mixin, this requires macro, so it's not useable yet, plus the interaction with a localisation tool and a compiler is not clear to me yet, but I hope that you agree that the result would be much more readable.
 I'm not a Tango user, but I do understand the need for this.
As said above, I also understand the need but I disagree with the solution. renoX
 
 (That's not to say you can't do internationalisation without Tango -
 you just have to write a parameter reordering function manually).
Sep 15 2007
next sibling parent reply "Janice Caron" <caron800 googlemail.com> writes:
On 9/15/07, renoX <renosky free.fr> wrote:
 So instead of having "Prenom {0}, Nom {1}", firsname, name" you would
 have "Prenom %{firstname} Name %{name}".
I don't believe that helps. For internationalisation, you would typically retrieve the format string from a database created by translators (i.e. human beings who are multilingual). The notion is to separate the translators from the programmers. So the actual programming code wouldn't look like printf_like_function("Prenom {0}, Nom {1}", firsname, name) rather, it's more likely to look like printf_like_function(translate[NAME],firstname,lastname). The string value returned by translate[NAME] should not need to be aware of what variable names are later going to be substituted into it (which might in any case be different at different points in the program). The model is, programmers write the code, then translators provide the international translations. The goal is to minimise the dependency between the two. Therefore, I believe that substitution by argument index is the right thing to do.
Sep 15 2007
parent Derek Parnell <derek psych.ward> writes:
On Sat, 15 Sep 2007 10:57:35 +0100, Janice Caron wrote:

 The string value returned by translate[NAME] should not need to be
 aware of what variable names are later going to be substituted into it
 (which might in any case be different at different points in the
 program).
 
 The model is, programmers write the code, then translators provide the
 international translations. The goal is to minimise the dependency
 between the two. Therefore, I believe that substitution by argument
 index is the right thing to do.
For what its worth, I have coded a routine called Expand. It is used thus ... result = Expand("Prenom {fn}, Nom {ln}", "fn", firstname, "ln", name); result = Expand("Surname {ln}, First name {fn}", "fn", firstname, "ln", name); Where tokens, such as {fn} and {ln} in this example, are used to locate keys with the same value in the argument list. The argument to the right of a key is it's associated value. The values are used to replace their respective embedded tokens in the format string. If the arguments do not match any token in the format string, the token is just removed from the output. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell
Sep 15 2007
prev sibling parent reply "Janice Caron" <caron800 googlemail.com> writes:
On 9/15/07, Janice Caron <caron800 googlemail.com> wrote:
 The model is, programmers write the code, then translators provide the
 international translations. The goal is to minimise the dependency
 between the two. Therefore, I believe that substitution by argument
 index is the right thing to do.
...otherwise, you might find the translators also translating the variable names, and that would be disastrous! Translators must be allowed to have zero knowledge of programming. In general, they only work with text files, Word documents or whatever. Programmers later algorithmically incorporate that into program source. (I did say internationalisation really requires its own thread!)
Sep 15 2007
parent reply renoX <renosky free.fr> writes:
Janice Caron a écrit :
 On 9/15/07, Janice Caron <caron800 googlemail.com> wrote:
 The model is, programmers write the code, then translators provide the
 international translations. The goal is to minimise the dependency
 between the two. Therefore, I believe that substitution by argument
 index is the right thing to do.
....otherwise, you might find the translators also translating the variable names, and that would be disastrous! Translators must be allowed to have zero knowledge of programming. In general, they only work with text files, Word documents or whatever. Programmers later algorithmically incorporate that into program source.
Sorry but if the translated strings contains variables, the translators must know the variables they can have so that they can put them at the correct location. So blind translations works only for pure strings, not format strings which was what we were talking about.
 (I did say internationalisation really requires its own thread!)
Agreed. renoX
Sep 15 2007
parent "Janice Caron" <caron800 googlemail.com> writes:
On 9/15/07, renoX <renosky free.fr> wrote:
 Sorry but if the translated strings contains variables, the translators
 must know the variables they can have so that they can put them at the
 correct location.
Why so? It is just as easy to translate "Reading file {1}" into Chinese as it is "Reading file {filename}". In anticipation of the argument that "Reading file {filename}" is more meaningful than "Reading file {1}", I point out that that is only true in English. Somewhere along the line, you might end up having to translate from Chinese to Russian or something, and by that point the string might as well read "Reading file {$B%U%!%$%kL>(B}". Numbers are preferable because they are internationally neutral.
 (I did say internationalisation really requires its own thread!)
Agreed.
Then ... should we start one and move this discussion there?
Sep 15 2007
prev sibling parent reply Sean Kelly <sean f4.ca> writes:
Janice Caron wrote:
 On 9/14/07, simax <simax gmx.net> wrote:
 
 I haven't used Tango (yet?). But I don't think I'll try it if it means
 I'll have to stop using Phobos. I had originally assumed it was an
 add-on, not a replacement. Is that wrong? Anyway, if it's a
 replacement, that's definitely a disincentive.
It's a replacement by necessity for the moment. Tango contains its own runtime implementation and therefore can't simply be linked to an app alongside Phobos. This is the real incentive for the merge. Sean
Sep 14 2007
parent reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Sean Kelly wrote:

 It's a replacement by necessity for the moment.  Tango contains its own 
 runtime implementation and therefore can't simply be linked to an app 
 alongside Phobos.  This is the real incentive for the merge.
Isn't it possible to merge the runtimes without merging the libraries ? --anders
Sep 15 2007
parent Sean Kelly <sean f4.ca> writes:
Anders F Björklund wrote:
 Sean Kelly wrote:
 
 It's a replacement by necessity for the moment.  Tango contains its 
 own runtime implementation and therefore can't simply be linked to an 
 app alongside Phobos.  This is the real incentive for the merge.
Isn't it possible to merge the runtimes without merging the libraries ?
Yes and no. The runtime contains a few user-visible features, most notably the Thread class. So barring some complex attempt at providing support for multiple threading implementations, these classes would have to be shared between the libraries. The obvious problem being where to put them. Sean
Sep 15 2007
prev sibling next sibling parent reply Robert Fraser <fraserofthenight gmail.com> writes:
simax Wrote:

 I don't prefer any of this two libraries. But i can't use library X und Y
together, because library X use phobos as base and library Y use tango as base.
Tangobos. http://www.dsource.org/projects/tangobos . It should work with a little recompilation for 90% of open-source libraries.
Sep 13 2007
parent simax <simax gmx.net> writes:
Robert Fraser Wrote:

 simax Wrote:
 
 I don't prefer any of this two libraries. But i can't use library X und Y
together, because library X use phobos as base and library Y use tango as base.
Tangobos. http://www.dsource.org/projects/tangobos . It should work with a little recompilation for 90% of open-source libraries.
Thanks. I know tangobos. This is a workaround but not a solution. This is a good example what new d developer must do to be successful with d. Sean Kelly gives me clear statement. Thanks a lot.
Sep 14 2007
prev sibling parent "Peter C. Chapin" <pchapin sover.net> writes:
simax wrote:

 I like D and i would like to see it successful. But i think, the
 current situation without 'one' standard library can't be successful.
I'd like to echo these concerns. I've been watching D for some time with the desire to start using it in real projects. I was quite pleased when v1.0 started to become stable. However, now I feel inhibited by this library issue. Arguments like "try both and use the one you like better" don't work for me. If I create a D library, I want it to be (easily) usable by the largest audience possible. That means I want to base it on the standard library that "wins." Right now I can't tell which one that is and so... I don't produce any D code. I don't actually care which library is better or about their different design philosophies. I care about standardization and stability. I was pleased to see some of the posts in this thread indicating that the D community is also concerned about this matter and that there are steps being taken to address the issue. I wish those involved the best of luck. There are definitely at least a few people who are not currently working with D because they are waiting for some kind of reconciliation between Tango and Phobos. I am such a person. Peter P.S. Feel free to make all the incompatible changes you like to either Phobos or Tango. I'm not using either right now so it doesn't matter to me. :-)
Sep 15 2007
prev sibling next sibling parent TomD <t_demmer_no_spam_ web.de> writes:
kris Wrote:
[...]
 That is so refreshing to hear some *constructive* criticism! You make a 
 number of valuable points: I think your suggestions make an enormous 
 amount of sense, and will be encouraging this to happen as you describe. 
 I wrote the IO chapter, so I know the guilty party there :p
Writing documentation is, after teaching, the second most frustrating thing in the world. Back in university I tried to hammer knowledge into students, now I try to teach the apparentices in the company I work for. The thought "they cannot all be f***g stupid, it must be me" occured to me more than once. The trick of good teaching is to listen at what point the pupil gets lost, and why. But I am getting off-topic. Ciao Tom
Sep 16 2007
prev sibling parent TomD <t_demmer_no_spam_ web.de> writes:
renoX Wrote:
[...]
 
 Better support for localization for one.  Tango's routines let you 
 change the order of arguments in the format string, since the grammars 
 of different languages don't always use the same word order.  You can 
 say "{1} is {2}" in Tango, in contrast to "%s is %s" of writefln.
Somehow I don't see that requiring me to count where my arguments are as a progress for me.
That is not the point. To me, french makes a lot more sense if I read the sentences from back to front, because that way the grammar becomes closer to German and I only need to figure out the meaning of the words (This probably tells you a lot about my knowledge of French :-) By the same reasoning, it sounds in some languages more elegant to say "Apples are there 3", instead of "There are 3 apples". Now you can program somehting like print("There are {1} {2}", number, fruits); Actually, you say something like print(wxT("There are {1} {2}"), number, fruits); Now, the translator comes into play to translate your program into something like Swahili. He knows nothing about pogramming, but that "There are {1} {2}" is in Swahili "Hakuna {2} matata {1}" (This tells you something about my Swahili knowledge :-) wxT() is actually the localizing function, a table lookup where "There are {1} {2}" goes in and "Hakuna {2} matata {1}" comes back. Ciao Tom
Sep 16 2007