Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
February 14, 2019 D grammar is Wild | ||||
---|---|---|---|---|
| ||||
There's lots of stuff I don't understand in the D grammar, or I only understand after a very significant effort. What's, say, this stuff with `Wild: Ng`? https://dlang.org/spec/grammar.html#Wild Shouldn't the meaning of the bold be specified? D could really use a proper spec. |
February 14, 2019 Re: D grammar is Wild | ||||
---|---|---|---|---|
| ||||
Posted in reply to Luís Marques | On Thursday, 14 February 2019 at 22:12:22 UTC, Luís Marques wrote:
> There's lots of stuff I don't understand in the D grammar, or I only understand after a very significant effort. What's, say, this stuff with `Wild: Ng`?
>
> https://dlang.org/spec/grammar.html#Wild
>
> Shouldn't the meaning of the bold be specified? D could really use a proper spec.
Wild stands for wildcard, an is what people know as `inout`.
I agree though that it should be renamed.
|
February 14, 2019 Re: D grammar is Wild | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stefan Koch | On Thursday, 14 February 2019 at 22:14:03 UTC, Stefan Koch wrote:
> Wild stands for wildcard
Yeah, that part I had kinda guessed. What's the Ng?
|
February 14, 2019 Re: D grammar is Wild | ||||
---|---|---|---|---|
| ||||
Posted in reply to Luís Marques | On Thursday, 14 February 2019 at 22:18:43 UTC, Luís Marques wrote:
> Yeah, that part I had kinda guessed. What's the Ng?
This section specifies name mangling. Ng is what goes into the mangled name for the inout() type constructor.
|
February 14, 2019 Re: D grammar is Wild | ||||
---|---|---|---|---|
| ||||
Posted in reply to Adam D. Ruppe | On Thursday, 14 February 2019 at 22:22:51 UTC, Adam D. Ruppe wrote:
> This section specifies name mangling. Ng is what goes into the mangled name for the inout() type constructor.
That's easy to overlook. The grammar is big enough that I need to search the web page for occurrences of productions, to try to make sense of it. Then things like "Type" appear but it's not actually related to the normal grammar, it's the ABI stuff. I mean, other than being specified in the form of a grammar, it doesn't really have any relation to the regular D grammar, does it? (Honest question, not a rhetorical one). I would argue it should be moved to its own page, to lessen the confusion.
|
Copyright © 1999-2021 by the D Language Foundation