diff options
author | Melody Horn <melody@boringcactus.com> | 2020-10-20 10:25:25 -0600 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2020-10-20 10:25:25 -0600 |
commit | ce992c815f05c8487850872bfe44999a08b1f340 (patch) | |
tree | 136b1e9c851db376d526ee00bebb1dea22f38db1 /index.md | |
parent | 8e9394ad85bc921e0658fd2758f5717540101627 (diff) | |
download | spec-ce992c815f05c8487850872bfe44999a08b1f340.tar.gz spec-ce992c815f05c8487850872bfe44999a08b1f340.zip |
add more details
Diffstat (limited to 'index.md')
-rw-r--r-- | index.md | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -26,7 +26,6 @@ Some of the footguns and complexity in C come from misfeatures that can simply n - Chaining relational/equality operators (e.g. `3 < x == 2`)
- Mixed chains of bitwise or logical operators (e.g. `2 & x && 4 ^ y`)
- The comma operator `,`
-- Strings that aren't UTF-8
### Explicit Beats Implicit
@@ -53,14 +52,17 @@ Some of the footguns and complexity in C come from misfeatures that can simply n Some C features are footguns by default, so Crowbar ensures that they are only used correctly.
-- Unions blah blah blah
+- Unions are not robust by default.
+ Crowbar only supports unions when they are [tagged unions](tagged-unions.md).
C's syntax isn't perfect, but it's usually pretty good.
However, sometimes it just sucks, and in those cases Crowbar makes changes.
-- Complicated types (function pointers, pointer-to-`const` vs `const`-pointer, etc)
+- C's variable declaration syntax is far from intuitive in nontrivial cases (function pointers, pointer-to-`const` vs `const`-pointer, etc).
+ Crowbar uses [simplified type syntax](types.md) to keep types and variable names distinct.
- `_Bool` is just `bool`, `_Complex` is just `complex` (why drag the preprocessor into it?)
- Adding a `_` to numeric literals as a separator
+- All string literals, char literals, etc are UTF-8
# Additions
|