←back to thread

127 points warothia | 1 comments | | HN request time: 0.354s | source
Show context
gwbas1c ◴[] No.42166517[source]
Important question: Why would anyone develop a web application in C? Typically web applications lean heavily on garbage collection and memory safety, because their bottlenecks are very rarely CPU/memory issues. The ROI on manually managing memory just isn't there for a typical web application.
replies(10): >>42166611 #>>42166628 #>>42166883 #>>42167123 #>>42167520 #>>42167739 #>>42167933 #>>42168255 #>>42169645 #>>42173754 #
williamcotton ◴[] No.42167520[source]
> The ROI on manually managing memory just isn't there for a typical web application.

You can use a per-request memory arena built with a simple bump allocator and then free the entire block when the request has been handled.

replies(1): >>42171326 #
1. kaba0 ◴[] No.42171326[source]
Still, why would I want to write C?

Then use a script language with similar memory semantics, PHP started out exactly that way, if I'm not mistaken.