Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
PS: I wrote a bit of an explanation for my preprocessor brainfuck interpreter, maybe you can learn a few tricks from that: https://github.com/camel-cdr/bfcpp/blob/main/TUTORIAL.md
I did get a few great responses there as well, though. One was a link to this impressive piece of work: https://github.com/Hirrolot/metalang99/blob/master/examples/lambda_calculus.c
The biggest obstacles to make some form of functional programming (think more like Rust than Haskell) possible are __VA_OPT__, auto, lambdas, and defer. IIRC the first two are coming in C23. The last two might make it into the next standard after that, but unlikely to make 23. If you're willing to limit yourself to GNU C (so compiling with GCC or Clang, or maybe ICC) you can get pretty close already today. (shameless self plug) My project Cnx (https://github.com/braxtons12/Cnx) attempts to bring a more modern approach to the language, and a big chunk of the features it implements are functional in nature.
Related posts
- Better C Generics: The Extendible _Generic
- I wrote an optimizing brainfuck interpreter using only the C Preprocessor, here is how
- Who needs C++? C preprocessor meta programming is the future.
- Let's write an optimizing Brainfuck interpreter using only the C Preprocessor
- Show HN: Optimizing brainfuck interpreter using only the C preprocessor