www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Using D, not developing D...

reply Henrik Harmsen <henrik harmsen.se> writes:
Which version of DMD should I use if I need a stable compiler?

I want to use D for developing an application but I need a stable compiler (as
bug free as possible). Will there be a fork into devel and stable? For me,
that's necessary.

Maybe the answer is someone else but Walter should pick this up, but I'd like
to hear your thoughts.

-- Henrik
Feb 23 2007
next sibling parent reply Frits van Bommel <fvbommel REMwOVExCAPSs.nl> writes:
Henrik Harmsen wrote:
 Which version of DMD should I use if I need a stable compiler?
 
 I want to use D for developing an application but I need a stable compiler (as
bug free as possible). Will there be a fork into devel and stable? For me,
that's necessary.
 
 Maybe the answer is someone else but Walter should pick this up, but I'd like
to hear your thoughts.
This is why the -v1 switch was added to DMD. It's supposed to preserve backwards-compatibility to DMD v1.00. The idea is that you can update the compiler to the newest version without losing the ability to compile programs that were legal for DMD v1.00. So then 'dmd' would be your devel, and 'dmd -v1' the stable.
Feb 23 2007
next sibling parent reply kris <foo bar.com> writes:
Frits van Bommel wrote:
 Henrik Harmsen wrote:
 
 Which version of DMD should I use if I need a stable compiler?

 I want to use D for developing an application but I need a stable 
 compiler (as bug free as possible). Will there be a fork into devel 
 and stable? For me, that's necessary.

 Maybe the answer is someone else but Walter should pick this up, but 
 I'd like to hear your thoughts.
This is why the -v1 switch was added to DMD. It's supposed to preserve backwards-compatibility to DMD v1.00. The idea is that you can update the compiler to the newest version without losing the ability to compile programs that were legal for DMD v1.00. So then 'dmd' would be your devel, and 'dmd -v1' the stable.
Can't do that when the runtime and GC changes -- it was kinda unstable for a few releases there, and -v1 won't affect it (obviously)
Feb 23 2007
parent reply Frits van Bommel <fvbommel REMwOVExCAPSs.nl> writes:
kris wrote:
 Frits van Bommel wrote:
 Henrik Harmsen wrote:

 Which version of DMD should I use if I need a stable compiler?

 I want to use D for developing an application but I need a stable 
 compiler (as bug free as possible). Will there be a fork into devel 
 and stable? For me, that's necessary.
[snip -v1 explanation]
 
 Can't do that when the runtime and GC changes -- it was kinda unstable 
 for a few releases there, and -v1 won't affect it (obviously)
Yes, that was a problem for a while. But then you could just hold off on upgrading[1], or if the runtime is still binary-compatible you can use the old runtime with the new compiler. [1]: Or revert to the last stable version if you've already upgraded; the old versions (down to 0.102, sep 2004) are still available from the site. And just to be pedantic: he asked about a stable compiler, not a stable runtime :P.
Feb 23 2007
parent Leandro Lucarella <llucarella integratech.com.ar> writes:
Frits van Bommel escribió:
 kris wrote:
 Frits van Bommel wrote:
 Henrik Harmsen wrote:

 Which version of DMD should I use if I need a stable compiler?

 I want to use D for developing an application but I need a stable 
 compiler (as bug free as possible). Will there be a fork into devel 
 and stable? For me, that's necessary.
[snip -v1 explanation]
 Can't do that when the runtime and GC changes -- it was kinda unstable 
 for a few releases there, and -v1 won't affect it (obviously)
Yes, that was a problem for a while. But then you could just hold off on upgrading[1], or if the runtime is still binary-compatible you can use the old runtime with the new compiler.
Yes, but you don't get the bugfixes then. I think a stable and unstable/testing/development branch is needed. In the stable branch, only well known, well tested, small bugfixes should be added (no new features). If you want to use new features, use the unstable branch but be aware that things may break. -- Leandro Lucarella Integratech S.A. 4571-5252
Feb 23 2007
prev sibling parent reply Henrik Harmsen <henrik harmsen.se> writes:
Frits van Bommel Wrote:

 Henrik Harmsen wrote:
 Which version of DMD should I use if I need a stable compiler?
 
 I want to use D for developing an application but I need a stable compiler (as
bug free as possible). Will there be a fork into devel and stable? For me,
that's necessary.
 
 Maybe the answer is someone else but Walter should pick this up, but I'd like
to hear your thoughts.
This is why the -v1 switch was added to DMD. It's supposed to preserve backwards-compatibility to DMD v1.00. The idea is that you can update the compiler to the newest version without losing the ability to compile programs that were legal for DMD v1.00. So then 'dmd' would be your devel, and 'dmd -v1' the stable.
I'm not asking about backwards compatibility, I'm asking about stability. A piece of software can be backwards compatible without being stable. To me, relying only on the -v1 switch seems like inadequate version control. The following problems immediately come to mind with this approach: How do I know which bug fixes have been made to the stable (-v1) and the devel version? I need to know this so I can see if a fix affects me or not and whether it is really stable (has few fixes over the last X months). How do I know which features are in -v1? For example, the compile time execution of functions doesn't seem to affect the language so it could be (is?) used for -v1 compilation. That is important to know since it affects performance of course. How are additions and fixes to the devel version being kept from affecting the stable version? Example: Are bugs in the compile time execution of functions affecting -v1? Then -v1 is really useless as a stamp for stability. -- Henrik
Feb 23 2007
parent reply torhu <fake address.dude> writes:
Henrik Harmsen wrote:
 Henrik Harmsen wrote:
 Which version of DMD should I use if I need a stable compiler?
 
 I want to use D for developing an application but I need a stable compiler (as
bug free as possible). Will there be a fork into devel and stable? For me,
that's necessary.
 
<snip> I think this has been asked before, and it doesn't seem likely to happen. Walter probably thinks it's too much work to maintain two branches. After all, he's alone on this project. So I guess the answer would be to stick with one version of the compiler (1.0 or 1.007 seems like good choices at the moment). And only upgrade when you know there's a version that contains a bug fix you need. Unittest and invariants might help verifying that your app behaves correctly with the new compiler version. <snip>
 How do I know which features are in -v1? 
 For example, the compile time execution of functions doesn't seem to affect
the language so it could be (is?) used for -v1 compilation. That is important
to know since it affects performance of course.
 
 How are additions and fixes to the devel version being kept from affecting the
stable version?
 Example: Are bugs in the compile time execution of functions affecting -v1?
Then -v1 is really useless as a stamp for stability.
-v1 just means that if your app compiled with dmd 1.0, it will still compile. It only disables compiler features or changes that break backward compatibility. Compile time functions don't affect runtime performance. Functions are only executed at compile time when they are used in situations where a compile-time result is needed. Like static initialization. In other words, they have to be used in places where it was an error to use them in earlier compiler versions.
Feb 23 2007
parent reply just jeff <jeffrparsons optusnet.com.au> writes:
Well, even if it's too much work for Walter at the moment, it could be 
worth considering this for GDC.
Feb 23 2007
parent Frits van Bommel <fvbommel REMwOVExCAPSs.nl> writes:
just jeff wrote:
 Well, even if it's too much work for Walter at the moment, it could be 
 worth considering this for GDC.
Well, GCC already has the "-std=" switch that can be used to select different C and C++ standards[1]. IIRC these actually disallow new features, even if non-breaking. So there's definitely precedent for it there. Perhaps a -std=d1 could be added to GDC? This would probably add some maintenance cost to GDC if it isn't done in the DMD front-end, though. [1]: -std=c99 for the latest C version (as far as it is supported), -std=gnu99 for the same + GNU extensions, and similarly -std=gnu++98/std=c++98 for C++ with and without extensions. And a bunch more for older standards and amended standards.
Feb 24 2007
prev sibling parent Don Clugston <dac nospam.com.au> writes:
Henrik Harmsen wrote:
 Which version of DMD should I use if I need a stable compiler?
 
 I want to use D for developing an application but I need a stable compiler (as
bug free as possible). Will there be a fork into devel and stable? For me,
that's necessary.
 
 Maybe the answer is someone else but Walter should pick this up, but I'd like
to hear your thoughts.
 
 -- Henrik
 
 
DStress gives a pretty good indication of compiler stability, although it doesn't seem to have been updated for a few weeks (ie, since DMD 1.001) http://dstress.kuehne.cn/www/dstress.html
Feb 23 2007