Let's Destroy C
81–90 of 192 posts
Re: Let's Destroy C
#82Big fan. I don’t see support for exceptions, maybe this can help: https://github.com/hraban/c-exceptions (I ended up using this in a job once. They didn’t hire me back...)
Re: Let's Destroy C
#83Earlier quoted context omitted.
Can you explain why?
To emphasise: This is about Bournegol. Nothing to do with this post. > Can you explain why? Because it isn't how most C libraries expect true/false to be defined. stdbool in C99 standardized things a bit, but before then what was generally accepted was: > true is 1 > false is !true (Often 0 in practice). Which means that any trivial: if(true) { ... } Won't work under Bournegol. Instead you _need_ to compare when doin…
Re: Let's Destroy C
#84Perfect usage of the title to get on HN frontpage.
Re: Let's Destroy C
#85When I started learning C++, there was't a C++ compiler available for my Atari ST (late 80s), there was only Borland C. So instead I used the C preprocessor to emulate classes, virtual functions etcetera. Not everything could be implemented this way, but it looked like C++ close enough for me to learn it.
That's basically how C++ was originally created, or the prototype, "C with Classes", albeit with a custom preprocessor. [0] > In October of 1979 I had a pre− processor, called Cpre, that added Simula− like classes to C run-ning and in March of 1980 this pre− processor had been refined to the point where it supported onereal project and several experiments. Recognising that you could do it that way is kinda awesome. M…
Interesting stuff:
"Cfront [the fist c++ compiler] was (and is) a traditional compiler front− end performing a complete check of the syntax and semantics of the language"
"[...] the C compiler is used as a code generator only. [...]. I stress this because there has been a long history of confusion about what Cfront was/is. It has been called a preprocessor because it generates C, and for people in the C community (and elsewhere) that has been taken as proof that Cfront was a rather simple program – something like a macro preprocessor."
Cfront being a preprocessor is something that gets repeated often. As you correctly point out, cpre was the preprocessor and it wasn't realy C++ yet.
Re: Let's Destroy C
#86Earlier quoted context omitted.
That's basically how C++ was originally created, or the prototype, "C with Classes", albeit with a custom preprocessor. [0] > In October of 1979 I had a pre− processor, called Cpre, that added Simula− like classes to C run-ning and in March of 1980 this pre− processor had been refined to the point where it supported onereal project and several experiments. Recognising that you could do it that way is kinda awesome. M…
Thanks, awesome paper (which remind me that I should read the ARM at some point). Interesting stuff: "Cfront [the fist c++ compiler] was (and is) a traditional compiler front− end performing a complete check of the syntax and semantics of the language" "[...] the C compiler is used as a code generator only. [...]. I stress this because there has been a long history of confusion about what Cfront was/is. It has been c…
Re: Let's Destroy C
#87evil.h == arduino.h
Re: Let's Destroy C
#88 // Original macro hack by Robert Elder (c) 2016
Described also back in 2000 on https://www.chiark.greenend.org.uk/~sgtatham/coroutines.html