46
Implementation Details / Keywords keywords keywords
« on: October 28, 2018, 11:36:12 AM »
First a quick note: I think the documentation is missing keywords. At least "func" isn't there and there might be more.
Anyway, I note that the types ixx and uxx are keywords in the language. Is there any reason why they are tokens instead of identifiers? Or is this just a consequence of borrowing from clang (c) where they are indeed tokens?
Furthermore, there are today keywords for things that are function lookalikes but are actually more like macros:
- elemsof
- enum_min
- enum_max
- sizeof
If the suggestion to use @ to indicate that the compiler does something special at this point, we could swap them for
- @elemsof
- @enum_min
- @enum_max
- @sizeof
This makes them reseved macro names rather than function names (I personally always found the sizeof operator a bit weird since it looked like a function but was a keyword)
The current list has 46 keywords. Eliminating the types and moving the above mentioned things to the "@ namespace", we get that down to 30.
Anyway, I note that the types ixx and uxx are keywords in the language. Is there any reason why they are tokens instead of identifiers? Or is this just a consequence of borrowing from clang (c) where they are indeed tokens?
Furthermore, there are today keywords for things that are function lookalikes but are actually more like macros:
- elemsof
- enum_min
- enum_max
- sizeof
If the suggestion to use @ to indicate that the compiler does something special at this point, we could swap them for
- @elemsof
- @enum_min
- @enum_max
- @sizeof
This makes them reseved macro names rather than function names (I personally always found the sizeof operator a bit weird since it looked like a function but was a keyword)
The current list has 46 keywords. Eliminating the types and moving the above mentioned things to the "@ namespace", we get that down to 30.