Liste des Groupes | Revenir à cl c |
On 11/04/2025 16:50, bart wrote:
That's not right. You pasted part of 6.7p1. The full syntax for declarations comprises all of 6.7.p1, plus 6.7.1p1, 6.7.2p1, 6.7.2p2 (constraints to do with the ordering of long, int etc), 6.7.2.1, 6.7.2.2, 6.7.3, 6.7.6, 6.7.7, and 6.7.8.Try reading it without your usual anti-C prejudice. Perhaps read the whole section of the standard.declaration-specifiers:>
storage-class-specifier declaration-specifiers opt
type-specifier declaration-specifiers opt
type-qualifier declaration-specifiers opt
function-specifier declaration-specifiers opt
alignment-specifier declaration-specifiers opt
That always reads to me like 'lots of twisty windy passages, all alike'.
>The C syntax for declarations here is for /all/ declarations in C. It's not just for typedefs in a simple little toy language.If the order were to be strictly specified, there would need to be a half-dozen more named and defined specifier lists in the syntax.>
This is the similar feature for my syntax, a bit of BNF:
>
typedef = [scopeattr] 'type' name = typespec
>
It does a bit more than C's 'typedef' in that such names can be exported, to render them visible to modules that import this one.
>
are going to make absurd claims about your language in comparison to C, you can expect to hear that it is a toy in comparison C.)Really? Please show /any/ declaration in C that I can't write in mine, but in a saner and less convoluted manner. Please define /any/ data structure that I can't express.
Humans have to parse it too. C must be the only non-esoteric language where you need to use third-party tools (CDECL etc) to make sense of type-declarations. Either that or follow complex spirular algorithms to decade them.That it makes it easier to parse?Who cares? That's irrelevant to the language design, except for toys where the only user is the person who writes the tools.
>
Les messages affichés proviennent d'usenet.