From ce992c815f05c8487850872bfe44999a08b1f340 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Tue, 20 Oct 2020 10:25:25 -0600 Subject: add more details --- index.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'index.md') diff --git a/index.md b/index.md index 55d1646..2d19c0a 100644 --- a/index.md +++ b/index.md @@ -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 -- cgit v1.2.3