Comment by Scubabear68
7 hours ago
From the article, "WRITING HTML AND CSS IN C ISN'T TOO BAD".
Um, any and all string handling in C is pretty miserable.
7 hours ago
From the article, "WRITING HTML AND CSS IN C ISN'T TOO BAD".
Um, any and all string handling in C is pretty miserable.
To be fair, the HTML and CSS in C wasn't too bad.. the Youtube scraper was also written in C and that was a lot more painful :)
I can empathize entirely. After writing a scraper for html in C, outputting html in C is a piece of cake.
tell me where working with strings is not miserable? Practically, modern languages with RAII make it easy at the cost of perfomance (doing a lot of allocations). So, if you doing lot of string handling, you still need to think how to do it in performant way. If doing it a bit - why care about miserable.
Emitting strings is fine, it's the parsing that sucks.
If you do it with the string functions from the standard library then yes, it is.
The standard string functionality is painful. I wrote my own string view and string builder that work with fixed size strings. No memory allocations, etc.