4 ms·
> Quick, name a language where I can do something simple like mention "Whenever this function is called, make sure there is enough free memory (at least ---- MB
by AndyKelley 10y ago
> Quick, name a language where I can do something simple like mention "Whenever this function is called, make sure there is enough free memory (at least ---- MB) before actually calling it; if there isn't, first swap out any objects from memory to disk, starting with the ones that had been used the longest time ago, and after the function has finished running, swap those back into memory."
Can you imagine trying to debug a program that used such a language feature? What a nightmare.
- logicallee 10y agoYeah it's a lot easier to reason about languages that are as dumb as a sack of rocks - they're so well-defined! Basically just syntax. Add a bit of syntax highlighting and you know EXACTLY what's going on. Which is my point. I look forward to languages that make it trivial to do super hard stuff. If debugging them is hard, make it easy to ask them what's going on. (Also difficult today, again, because they are as dumb as a sack of rocks.) Every example I gave was super well-defined.
- webmaven 10y agoSure it is well defined, but the resulting performance of the program isn't necessarily deterministic, it will be super sensitive to whatever else is going on in the machine as well as whatever else the program is doing. Why would you want to add a syntactical feature that duplicates the services the OS is already providing and makes the performance of the program less predictable and consistent?
- al2o3cr 10y ago"I'm going to remodel my nasal cavity to accommodate a swarm of bees" is a well-defined goal - it just isn't something you'd want to do, even if you've got access to tooling that makes it straightforward.