5 ms·
I've written several (toy) compilers in both Lisp and Standard ML. I completely agree with the statement. Mostly, algebraic data types are a huge win for repres
by anon_d 15y ago
I've written several (toy) compilers in both Lisp and Standard ML. I completely agree with the statement. Mostly, algebraic data types are a huge win for representing expression trees.
- calibraxis 15y agoHe claims, "ML programs can't crash the system; if it compiles, it will run, and you won't get a segmentation fault." Does that mean there's static safeguards against out-of-memory errors? (This is not snarky; I don't know ML or how it handles this situation.)
- tomjen3 15y agoOut of memory errors generally don't happen on modern systems. What happens is that you end up using so much swap that the program becomes so slow that the user cries himself to sleep or something.
- mhd 15y ago> Out of memory errors generally don't happen on modern systems. Well, unless we're talking about smartphones or virtualized environments (e.g. VPS). Both not very relevant in a compiler context, of course.
- calibraxis 15y agoYesterday, I got a Java error about running out of heap space, when I was testing a Clojure program on an extreme case (to test its limits). (Which of course runs in a VM, but I'm not sure you meant the JVM.)
- groovy2shoes 15y agoThe error doesn't mean that your system is out of memory. The JVM allocates a glob of memory at startup to allocate objects from, and is configured with a maximum heap size. If you run out of heap space on the JVM, you can relaunch the java process with a higher max heap size using the -Xmx option.
- tomjen3 15y agoI agree on smarthphones (but then those are not really computers) but I don't think there is anything that prevents you from using swap on a vps...
- mhd 15y agoDoesn't OpenVZ run without swap? Never mind that you can run out of swap, too…