Passing Structs to function like in C

WebFreak001 via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Aug 12 10:47:34 PDT 2016


On Friday, 12 August 2016 at 17:33:34 UTC, Cauterite wrote:
> On Friday, 12 August 2016 at 16:50:43 UTC, ag0aep6g wrote:
>> On 08/12/2016 05:23 PM, Cauterite wrote:
>> No semicolon there, please.
>
> Why would I not terminate a declaration with a semi-colon?
> Why should a declaration not end in a semi-colon just because 
> the last token is a brace?
> Why should I not tell the lexer precisely where my declaration 
> ends instead of relying on whatever other tokens floating 
> around it not interfering?
> Why must every thread in this forum contain more posts 
> regarding some irrelevant tangent than posts responding to the 
> original topic?

That would be like putting a semicolon after a while or if block 
or after defining a delegate inside an argument list.

I think it's a bug that dmd doesn't show a warning for 
unnecessary semicolons outside of function blocks, because inside 
of them it also shows a warning.

Also it's not D-style to put a semicolon there and it's also 
never specified in the grammar spec. It's just treated as 
separate empty statement.


More information about the Digitalmars-d-learn mailing list