Thread overview | ||||||
---|---|---|---|---|---|---|
|
May 06, 2015 Signs by which to recognize D1 | ||||
---|---|---|---|---|
| ||||
Someone looks at a chunk of D code of murky origin. Possibly, it is old, maybe D1 not D2. Inadequately commented, believe it or not, and not other information. What are some easy to spot details in the syntax by which the onlooker can know it's D1 not D2? |
May 06, 2015 Re: Signs by which to recognize D1 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Daren Scot Wilson | On Wednesday, 6 May 2015 at 07:56:53 UTC, Daren Scot Wilson wrote:
> Someone looks at a chunk of D code of murky origin. Possibly, it is old, maybe D1 not D2. Inadequately commented, believe it or not, and not other information.
>
> What are some easy to spot details in the syntax by which the onlooker can know it's D1 not D2?
a lot of keywords(pure,nothrow, shared, etc) aren't available in D1 afaik, you generally see those sprinkled all over any modern D code.
|
May 06, 2015 Re: Signs by which to recognize D1 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Daren Scot Wilson | On Wednesday, 6 May 2015 at 07:56:53 UTC, Daren Scot Wilson wrote:
> Someone looks at a chunk of D code of murky origin. Possibly, it is old, maybe D1 not D2. Inadequately commented, believe it or not, and not other information.
>
> What are some easy to spot details in the syntax by which the onlooker can know it's D1 not D2?
keywords - lack of pure @safe nothrow @nogc immutable __gshared
strings - use of d|w|char[] instead of d|w|string
operators - use of old operator overloads: opCom, opAdd, opSub ...
|
May 07, 2015 Re: Signs by which to recognize D1 | ||||
---|---|---|---|---|
| ||||
Posted in reply to rumbu Attachments: | On Wed, 06 May 2015 14:26:43 +0000, rumbu wrote:
> operator overloads: opCom, opAdd, opSub ...
phobos' std.xml, std.variand and std.bitmanip are D1! ;-)
|
Copyright © 1999-2021 by the D Language Foundation