February 21, 2005 Re: Extra semicolons, Errors or not ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Regan Heath | Regan Heath wrote:
>> There are plenty of other more important areas to concentrate on in
>> D.
>
>
> Sure, and once they're done?
>
> Regan
>
Once they're done, I bet there are already a load of other problems
more important than the cosmetic "noop" issue.
|
February 21, 2005 Re: Extra semicolons, Errors or not ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to zwang | On Mon, 21 Feb 2005 12:28:37 +0800, zwang wrote:
> Regan Heath wrote:
>>> There are plenty of other more important areas to concentrate on in D.
>>
>>
>> Sure, and once they're done?
>>
>> Regan
>>
>
>
> Once they're done, I bet there are already a load of other problems more important than the cosmetic "noop" issue.
I tend to agree.
|
February 21, 2005 Re: Extra semicolons, Errors or not ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Thomas Kühne | Thomas Kühne wrote: > |>Are any of these extra semicolons really errors ? > |> > |>>void main() > |>>{ > |>> null; > |>>} > |> > |>They all pass the current D compiler silently... > | > | They all look ok to me > > > http://digitalmars.com/d/statement.html#expression > # Expressions that have no affect, like (x + x), are illegal in > # expression statements. OK, that would make the last meaningless "null;" (or "0;" or whatever) illegal. It seems that GCC takes an issue with it as well, when I tried: "warning: statement with no effect" The other ones seem to be OK to all (GDC, GCC, and the rest of you) So I guess it's just another Brace Style to getting used to then... --anders PS. The last example was bad anyway, as it's not an "extra semicolon" |
February 21, 2005 Re: Extra semicolons, Errors or not ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to zwang | zwang wrote:
>>> There are plenty of other more important areas to concentrate on in
>>> D.
>>
>> Sure, and once they're done?
>>
>> Regan
>
> Once they're done, I bet there are already a load of other problems
> more important than the cosmetic "noop" issue.
And we've been discussing those as well, both "high" and "low"...
I've commented in quite a few areas, like "void main", "writeln"
"str", "imaginary real", "Object.printf" and such important ones ?
This thread was just about a "new" brace style, using semicolons.
--anders
|
February 21, 2005 Re: Extra semicolons, Errors or not ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Matthew |
Matthew wrote:
> I have a personal coding standard that says an empty block *must* be represented with
>
> {}
>
It's easy to search for, easy to spot in code.
And explicit. I'll adopt it.
|
February 21, 2005 Re: Extra semicolons, Errors or not ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Regan Heath | "Regan Heath" wrote:
[...]
> Sure, but A comment is not 'required'.
[...]
Nor is it a keyword: `if()op=op;'
-manfred
|
February 21, 2005 Re: Extra semicolons, Errors or not ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Manfred Nowak | On Mon, 21 Feb 2005 20:09:01 +0000 (UTC), Manfred Nowak <svv1999@hotmail.com> wrote:
> "Regan Heath" wrote:
>
> [...]
>> Sure, but A comment is not 'required'.
> [...]
>
> Nor is it a keyword: `if()op=op;'
Touche.. but it could be :)
Regan
|
February 21, 2005 Was: Extra semicolons... Flame or not ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anders F Björklund | Once we are so serious we have to choose the Python way :-) ..What code looks fine => that code works fine => any code that is not so precise => must be wrong => compiler error... (This is the opposite side and I really do not share this idea.) When we finish to discuss "important D things" think a little bit! Our common goal is to form D a language, which is easy to learn, easy to use, easy to read and easy to understand but powerful in any way we can imagine. How to do it is the question only. A simple and unambigous syntax is real need. It makes the compiler able to catch the most common mistakes... Strong types, few automatic type conversion and a consequent runtime library helps the compiler to detect the real point of error... [...] Regarding the original issue: my opinion is ... for(...blablabla..) is correct, the comment shows the intention { // } nop; is ugly and misleading, thumb down (perhaps nop; statement could have other important meaning) ---------- Tamas Nagy In article <cvc39u$1qnt$2@digitaldaemon.com>, =?ISO-8859-15?Q?Anders_F_Bj=F6rklund?= says... > >zwang wrote: > >>>> There are plenty of other more important areas to concentrate on in >>> >>> Sure, and once they're done? >>> >> Once they're done, I bet there are already a load of other problems more important than the cosmetic "noop" issue. > >And we've been discussing those as well, both "high" and "low"... > >I've commented in quite a few areas, like "void main", "writeln" "str", "imaginary real", "Object.printf" and such important ones ? > >This thread was just about a "new" brace style, using semicolons. > >--anders |
February 21, 2005 Re: Was: Extra semicolons... Flame or not ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to MicroWizard | On Mon, 21 Feb 2005 22:17:35 +0000 (UTC), MicroWizard <MicroWizard_member@pathlink.com> wrote: > Once we are so serious we have to choose the Python way :-) > ..What code looks fine => that code works fine => any code that is > not so precise => must be wrong => compiler error... > (This is the opposite side and I really do not share this idea.) > > When we finish to discuss "important D things" think a little bit! > > Our common goal is to form D a language, which is easy to learn, > easy to use, easy to read and easy to understand but powerful > in any way we can imagine. How to do it is the question only. > > A simple and unambigous syntax is real need. It makes the compiler > able to catch the most common mistakes... > > Strong types, few automatic type conversion and a consequent runtime library > helps the compiler to detect the real point of error... > > [...] > > Regarding the original issue: my opinion is ... > > for(...blablabla..) is correct, the comment shows the intention > { > // > } > > nop; is ugly and misleading, thumb down > (perhaps nop; statement could have other important meaning) Well... I've given up on the idea, but, I would like you to qualify why you think its misleading? Regan |
Copyright © 1999-2021 by the D Language Foundation