Thread overview | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
April 16, 2014 DMD coding style rules? | ||||
---|---|---|---|---|
| ||||
is there? if so, where is it? Also, I see dmd is written in C++ but still uses C style to do stuff eg, printf() instead of cout. Is this why C++ libraries can increase a lot size (and performance?) of executable which current style don't? |
April 16, 2014 Re: DMD coding style rules? | ||||
---|---|---|---|---|
| ||||
Posted in reply to asman | "asman" wrote in message news:maojdlxhbwuhxqrmvvjf@forum.dlang.org... > is there? if so, where is it? Also, I see dmd is written in C++ but still uses C style to do stuff eg, printf() instead of cout. Is this why C++ libraries can increase a lot size (and performance?) of executable which current style don't? There are no formal rules that I'm aware of (unless somebody added them to the wiki) but the (frontend) code is fairly consistent. The C-ish style is mostly due to age and Walter's preferences. This has turned out to be a huge advantage as it makes conversion to D much easier than C++-style code with heavy stl usage etc. |
April 16, 2014 Re: DMD coding style rules? | ||||
---|---|---|---|---|
| ||||
Posted in reply to asman | V Wed, 16 Apr 2014 13:32:45 +0000 asman via Digitalmars-d <digitalmars-d@puremagic.com> napsáno: > is there? if so, where is it? http://dlang.org/dstyle.html |
April 16, 2014 Re: DMD coding style rules? | ||||
---|---|---|---|---|
| ||||
Posted in reply to asman | V Wed, 16 Apr 2014 13:32:45 +0000
asman via Digitalmars-d <digitalmars-d@puremagic.com> napsáno:
> is there? if so, where is it?
sorry I post coding styles for D not for dmd
|
April 16, 2014 Re: DMD coding style rules? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Daniel Kozák | "DanielKozákvia Digitalmars-d" wrote in message news:mailman.99.1397656987.2763.digitalmars-d@puremagic.com... > sorry I post coding styles for D not for dmd They are similar. |
April 19, 2014 Re: DMD coding style rules? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Daniel Murphy | On Wednesday, 16 April 2014 at 13:57:33 UTC, Daniel Murphy wrote:
> "asman" wrote in message news:maojdlxhbwuhxqrmvvjf@forum.dlang.org...
>
>> is there? if so, where is it? Also, I see dmd is written in C++ but still uses C style to do stuff eg, printf() instead of cout. Is this why C++ libraries can increase a lot size (and performance?) of executable which current style don't?
>
> There are no formal rules that I'm aware of (unless somebody added them to the wiki) but the (frontend) code is fairly consistent.
>
> The C-ish style is mostly due to age and Walter's preferences. This has turned out to be a huge advantage as it makes conversion to D much easier than C++-style code with heavy stl usage etc.
Thanks very much. In this case I can assume there's no std::
stuff and it isn't allowed, correct?
|
April 19, 2014 Re: DMD coding style rules? | ||||
---|---|---|---|---|
| ||||
Posted in reply to asman | On Saturday, 19 April 2014 at 01:50:17 UTC, asman wrote:
> On Wednesday, 16 April 2014 at 13:57:33 UTC, Daniel Murphy wrote:
>> "asman" wrote in message news:maojdlxhbwuhxqrmvvjf@forum.dlang.org...
>>
>>> is there? if so, where is it? Also, I see dmd is written in C++ but still uses C style to do stuff eg, printf() instead of cout. Is this why C++ libraries can increase a lot size (and performance?) of executable which current style don't?
>>
>> There are no formal rules that I'm aware of (unless somebody added them to the wiki) but the (frontend) code is fairly consistent.
>>
>> The C-ish style is mostly due to age and Walter's preferences.
>> This has turned out to be a huge advantage as it makes conversion to D much easier than C++-style code with heavy stl usage etc.
>
> Thanks very much. In this case I can assume there's no std::
> stuff and it isn't allowed, correct?
I understood there's no formal rules but I mean, Walter will not like use these stuff
|
April 19, 2014 Re: DMD coding style rules? | ||||
---|---|---|---|---|
| ||||
Posted in reply to asman | "asman" wrote in message news:ktcpixnpmessxamqelmh@forum.dlang.org... > Thanks very much. In this case I can assume there's no std:: > stuff and it isn't allowed, correct? Yes. If you started using namespaces, stl, etc it would break DDMD so it's essentially banned now. |
Copyright © 1999-2021 by the D Language Foundation