diff options
-rw-r--r-- | index.md | 6 | ||||
-rw-r--r-- | safety.md | 7 |
2 files changed, 6 insertions, 7 deletions
@@ -1,13 +1,11 @@ Crowbar: the good parts of C, with a little bit extra.
-**This is entirely a work-in-progress, and should not be relied upon to be stable in any way.**
+**This is entirely a work-in-progress, and should not be relied upon to be stable (or even true) in any way.**
-Crowbar is a language that compiles directly to [C99](https://en.wikipedia.org/wiki/C99), and aims to remove as many [footgun](https://en.wiktionary.org/wiki/footgun)s and as much needless complexity from C as possible while still being familiar to C developers.
+Crowbar is a language that is derived from (and, wherever possible, interoperable with) C, and aims to remove as many [footgun](https://en.wiktionary.org/wiki/footgun)s and as much needless complexity from C as possible while still being familiar to C developers.
Ideally, a typical C codebase should be straightforward to rewrite in Crowbar, and any atypical C constructions not supported by Crowbar can be left as C.
-In principle, there's no reason it would be impossible to write a compiler directly for Crowbar, skipping the C step entirely, but that would take a lot of work.
-
# Removals
Some of the footguns and complexity in C come from misfeatures that can simply not be used.
@@ -46,11 +46,12 @@ bounds checking, dubious-pointer checking ## Use after free
-`free(x);` not followed by `x = NULL;` is a compiler error
+`free(x);` not followed by `x = NULL;` is a compiler error.
+`owned` and `borrowed` keywords
# Uninitialized variables
-C already warns about these in most cases, so we're good.
+forbid them in syntax
## Null pointer dereference
@@ -58,7 +59,7 @@ dubious-pointer checking ## Wild pointers
-let C handle it
+dubious-pointer checking
# Memory leak
|