4 ms·
C doesn't have tagged unions, which makes it a terrible language to write pretty much anything in. Most of the other pieces you need for good programming you ca
by lmm 11y ago
C doesn't have tagged unions, which makes it a terrible language to write pretty much anything in. Most of the other pieces you need for good programming you can write yourself in C, but you can't make a safe tagged union out of thin air, and if you rely on helper functions or macros then your tools won't understand them.
It's also so bad at expressing literal values that I've seen a serious recommendation to write literal strings and parse them instead ( http://www.tedunangst.com/flak/post/string-interfaces http://www.tedunangst.com/flak/post/string-interfaces ).
The type system doesn't even do generics, never mind higher kinds. Maybe you could keep a web framework small enough that that wouldn't be too big a deal.
- rwmj 11y agoThese are all valid reasons against using C for anything at all, but they apply to many other languages that people use for web apps too. It's worth noting that another web framework I wrote a couple of years later was written in OCaml[1]. [1] https://savannah.nongnu.org/projects/modcaml https://savannah.nongnu.org/projects/modcaml - also dead upstream, and there are now much better choices for OCaml web apps.
- lmm 11y agoPeople still use untyped languages for some things, but for the rest I don't think so? I mean if you have virtual functions then you can effectively implement (inefficient) tagged unions, and every language I've seen used on the web has a reasonable syntax for basic values.