Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
October 28, 2008 should I use 1.0 or 2.0? | ||||
---|---|---|---|---|
| ||||
For production applications, should I be using D 1.0 or D 2.0? |
October 28, 2008 Re: should I use 1.0 or 2.0? | ||||
---|---|---|---|---|
| ||||
Posted in reply to akcom | Reply to akcom,
> For production applications, should I be using D 1.0 or D 2.0?
>
1.0 (This is what I'm using right now for a production application)
|
October 28, 2008 Re: should I use 1.0 or 2.0? | ||||
---|---|---|---|---|
| ||||
Posted in reply to akcom | On Tue, Oct 28, 2008 at 7:36 PM, akcom <CppCoder@gmail.com> wrote:
> For production applications, should I be using D 1.0 or D 2.0?
>
One point oh. Not only is 2.0 still in alpha (and nowhere near done, it seems), almost no libraries are designed for/work with it.
|
October 29, 2008 Re: should I use 1.0 or 2.0? | ||||
---|---|---|---|---|
| ||||
Posted in reply to akcom | akcom wrote:
> For production applications, should I be using D 1.0 or D 2.0?
1.0. But I suggest finding out the differences between 1.0 and 2.0 so you have some idea what you'll be in for if/when you decide to upgrade. To ease the transition, there are some simple tricks that will help, such as labeling ostensibly const function parameters with 'in'. For example:
void fn( in char[] str ) {}
In D 1.0 this is equivalent to:
void fn( char[] str ) {}
however, in D 2.0 this is equivalent to:
void fn( const char[] str ) {}
Since string literals in D 2.0 are immutable, only immutable and constant variables may reference them. So:
fn( "hello" );
works in D 2.0 so long as fn() is defined as:
fn( string str );
fn( const char[] str );
fn( invariant char[] str );
but not:
fn( char[] str );
Most of the rest isn't worth the trouble, but I've found this to be a real time-saver for making code portable between D 1.0 and 2.0.
Sean
|
October 29, 2008 Re: should I use 1.0 or 2.0? | ||||
---|---|---|---|---|
| ||||
Posted in reply to akcom | akcom wrote:
> For production applications, should I be using D 1.0 or D 2.0?
An awfully broad a question, the answer might well be neither depending on your needs for production. What are your requirements? What's your definition of production? Based on the original question, you'll primarily be getting opinions. With some requirements, maybe a more objective and informed answer can be formed.
Later,
Brad
|
Copyright © 1999-2021 by the D Language Foundation