digitalmars.D - Reviewing Phobos
- Orgoton (4/4) Feb 09 2007 I've been checking out the code of Phobos and I noticed it has the copyr...
- Frits van Bommel (4/5) Feb 09 2007 Don't you mean the other way around?
- Orgoton (2/8) Feb 09 2007 Ups, I made a typo: not "bool" but "BOOL" (caps). Also, "1" is used inst...
- Frits van Bommel (6/15) Feb 09 2007 Ah, that'd be in the windows-specific code, right?
- jcc7 (25/29) Feb 09 2007 notice dating 2004 (at least on file.d which is the one I'm currently re...
- Howard Berkey (4/14) Feb 09 2007 I don't quite understand the comparison. Phobos is the D standard libra...
- Frits van Bommel (3/4) Feb 09 2007 Boost doesn't replace the standard C++ library, it complements it. Big
- Howard Berkey (2/7) Feb 09 2007 Ahh, I had misunderstood; I thought they were usable simultaneously. I ...
- Sean Kelly (31/43) Feb 09 2007 The runtime code. Unlike C++, D relies on a lot of 'hidden'
- Tomas Lindquist Olsen (3/8) Feb 09 2007 It would be really nice if phobos and Tango could share the lowest level...
- Sean Kelly (3/13) Feb 10 2007 I agree :-)
- Howard Berkey (3/19) Feb 10 2007 Me too, and thanks for the great response explaining things a couple pos...
- Lionello Lunesu (3/14) Feb 13 2007 Yes, I hope this will happen, too....
I've been checking out the code of Phobos and I noticed it has the copyright notice dating 2004 (at least on file.d which is the one I'm currently reviewing). I've been only adding some documentation and arranging the code to the format specified on http://www.digitalmars.com/d/dstyle.html but I've been noticing some occasional "bool" instead of "bit". Also, naming conventions are not followed (like isfile() instead of isFile()). I'd hope I'd get an answer from someone from the D programming language development team. Should I correct this name conventions as well, or shall I leave them as they are, and only add Documentation lines and non-code altering stuff like white spaces and indentation? You can mail me an answer if you'd like or reply on the forums. Thank a lot.
Feb 09 2007
Orgoton wrote:I've been noticing some occasional "bool" instead of "bit".Don't you mean the other way around? "bit" is just an alias to "bool" created in order to not break too much code when the native bit type was removed from the language AFAIK...
Feb 09 2007
Frits van Bommel Wrote:Orgoton wrote:Ups, I made a typo: not "bool" but "BOOL" (caps). Also, "1" is used instead "true" and "0" instead of "false".I've been noticing some occasional "bool" instead of "bit".Don't you mean the other way around? "bit" is just an alias to "bool" created in order to not break too much code when the native bit type was removed from the language AFAIK...
Feb 09 2007
Orgoton wrote:Frits van Bommel Wrote:Ah, that'd be in the windows-specific code, right? IIRC 'BOOL' is an alias of int used by Windows APIs because C doesn't have a real bool type (at least, it didn't until C99, after the APIs were created). So don't change those.Orgoton wrote:Ups, I made a typo: not "bool" but "BOOL" (caps). Also, "1" is used instead "true" and "0" instead of "false".I've been noticing some occasional "bool" instead of "bit".Don't you mean the other way around? "bit" is just an alias to "bool" created in order to not break too much code when the native bit type was removed from the language AFAIK...
Feb 09 2007
== Quote from Orgoton (arkangath gmail.com)'s articleI've been checking out the code of Phobos and I noticed it has the copyrightnotice dating 2004 (at least on file.d which is the one I'm currently reviewing). I've been only adding some documentation and arranging the code to the format specified on http://www.digitalmars.com/d/dstyle.html but I've been noticing some occasional "bool" instead of "bit". Also, naming conventions are not followed (like isfile() instead of isFile()).I'd hope I'd get an answer from someone from the D programming languagedevelopment team. Should I correct this name conventions as well, or shall I leave them as they are, and only add Documentation lines and non-code altering stuff like white spaces and indentation?You can mail me an answer if you'd like or reply on the forums. Thank a lot.I think the one and only memeber of the "D programming language development team" is Walter Bright. If you want to be sure that you're not wasting your time with your improvements, you need to get a response from him. There's enough traffic on these newsgroups, so he may not even have read any of your posts on this topic yet. I think what your doing sounds valuable, but I suspect changing the names of functions in Phobos is going a lot farther than Walter would be willing to go. Consistency is great, but changing the capitalization does break code. It might be a great improvement, but I don't expect Walter to approve that. The design (or lack of design) of Phobos can be a controversial topic. For example, I think that the Tango project (http://www.dsource.org/projects/tango) was started because people being disappointed with Phobos. The Tango developers have already given up on getting Walter to improve Phobos -- they just want to replace Phobos altogether. Of course, I'm not involved in the development of Phobos or Tango, so what do I know. ;) jcc7
Feb 09 2007
jcc7 Wrote:The design (or lack of design) of Phobos can be a controversial topic. For example, I think that the Tango project (http://www.dsource.org/projects/tango) was started because people being disappointed with Phobos. The Tango developers have already given up on getting Walter to improve Phobos -- they just want to replace Phobos altogether. Of course, I'm not involved in the development of Phobos or Tango, so what do I know. ;) jcc7I don't quite understand the comparison. Phobos is the D standard library. It should be as concise and powerful as possible, but it should not be a huge project necessarily. Tango, on the other hand, is a platform library. It is more in the vein of, say, the Boost C++ library, from my perspective. It can be much larger and filled with things you wouldn't normally expect in a good, small std lib. I could be totally wrong here, but that's how things look to me. Granted I have been developing in D for less than two months so take my opinions with a large grain of salt :)
Feb 09 2007
Howard Berkey wrote:Tango, on the other hand, is a platform library. It is more in the vein of, say, the Boost C++ library, from my perspective. It can be much larger and filled with things you wouldn't normally expect in a good, small std lib.Boost doesn't replace the standard C++ library, it complements it. Big difference.
Feb 09 2007
Frits van Bommel Wrote:Howard Berkey wrote:Ahh, I had misunderstood; I thought they were usable simultaneously. I didn't see anything that would prevent you from using them together at first glance.Tango, on the other hand, is a platform library. It is more in the vein of, say, the Boost C++ library, from my perspective. It can be much larger and filled with things you wouldn't normally expect in a good, small std lib.Boost doesn't replace the standard C++ library, it complements it. Big difference.
Feb 09 2007
Howard Berkey wrote:Frits van Bommel Wrote:and filled withHoward Berkey wrote:Tango, on the other hand, is a platform library. It is more in the vein of, say, the Boost C++ library, from my perspective. It can be much largerThe runtime code. Unlike C++, D relies on a lot of 'hidden' functionality to support various language features. One of the original goals of Ares, and transitively for Tango, was to define a strict and logical separation between the core components of a D application: the compiler runtime code, the garbage collector, and the standard library itself. One benefit of such an approach is that it allows each kind of developer to do their job independently of the other. The compiler writer need only expose or call a specific set of predefined functions, and the same is true for someone crafting a garbage collector or a standard library. Each component is separately compilable and need only be linked to the user's executable to create a complete and working D application. This is discussed briefly in the Tango Advanced Configuration Guide: http://dsource.org/projects/tango/wiki/TopicAdvancedConfiguration So in essence, I believe Tango is three things: a well-defined standard for creating D language support code, a minimal and configurable user-level wrapper around this code (in the form tango.core.*), and a robust user library and development framework. The result is that the visible portion of Tango is completely separable from the Tango runtime. In fact, this is one reason Tango currently doesn't ship with a comprehensive static library (the other being technical issues with exposing template code from libraries). If you don't care about the user-level portion of Tango, you're free replace it or simply get rid of it entirely. Once the template issues are resolved a static library will be made available, but I do not personally believe it should ever be integrated with the runtime code, optimizing linker or no. The purposes of each are quite distinct, and they should remain that way :-) SeanAhh, I had misunderstood; I thought they were usable simultaneously. I didn't see anything that would prevent you from using them together at first glance.things you wouldn't normally expect in a good, small std lib.Boost doesn't replace the standard C++ library, it complements it. Big difference.
Feb 09 2007
Sean Kelly wrote:One of the original goals of Ares, and transitively for Tango, was to define a strict and logical separation between the core components of a D application: the compiler runtime code, the garbage collector, and the standard library itself.It would be really nice if phobos and Tango could share the lowest levels. Compiler runtime code and garbage collector.
Feb 09 2007
Tomas Lindquist Olsen wrote:Sean Kelly wrote:I agree :-) SeanOne of the original goals of Ares, and transitively for Tango, was to define a strict and logical separation between the core components of a D application: the compiler runtime code, the garbage collector, and the standard library itself.It would be really nice if phobos and Tango could share the lowest levels. Compiler runtime code and garbage collector.
Feb 10 2007
Sean Kelly Wrote:Tomas Lindquist Olsen wrote:Me too, and thanks for the great response explaining things a couple posts back. I had naively assumed that the core runtime code was external to phobos but if I had not thought it through.Sean Kelly wrote:I agree :-) SeanOne of the original goals of Ares, and transitively for Tango, was to define a strict and logical separation between the core components of a D application: the compiler runtime code, the garbage collector, and the standard library itself.It would be really nice if phobos and Tango could share the lowest levels. Compiler runtime code and garbage collector.
Feb 10 2007
Tomas Lindquist Olsen wrote:Sean Kelly wrote:Yes, I hope this will happen, too.... L.One of the original goals of Ares, and transitively for Tango, was to define a strict and logical separation between the core components of a D application: the compiler runtime code, the garbage collector, and the standard library itself.It would be really nice if phobos and Tango could share the lowest levels. Compiler runtime code and garbage collector.
Feb 13 2007