3 ms·
I’d rather a language is designed to accommodate the human mind, and work back from there through the compiler to figure out how to map that to the capabilities
by user3939382 3y ago
I’d rather a language is designed to accommodate the human mind, and work back from there through the compiler to figure out how to map that to the capabilities of the hardware, than the reverse.
Speaking for myself, when I’m mentally modeling how I logically work through a problem, which concepts I’ve allocated, used, and freed are not a part of my thought process.
- dartos 3y agoThat’s highly dependent on the kind of software you write. Some software necessitates the programmer thinking about memory usage and optimization (games, simulations, machine learning, etc)
- zarathustreal 3y agoThinking about memory usage and optimization is the role of the compiler. The fact that some software necessitates the programmer thinking about it is just a consequence of current technology.
- dartos 3y agoI don’t think that’s true. There are some cases where novel memory layouts are necessary. Especially in graphics programming where you need to, at times, cleverly lay out memory to use the most of every available buffer to create arbitrary visual effects. Compilers can’t automatically create novel layouts.
- lupire 3y agoThat's 0.00001% of the effort of programming. You also need custom hardware sometimes, like TPUs. That doesn't make software unimportant.
- AnimalMuppet 3y agoWe've been waiting for a "sufficiently advanced compiler" for a very long time. If you're going to write programs for real computers, using real compilers, sometimes you have to care about such things. (If you're going to write programs for hypothetical computers, using hypothetical compilers, such constraints don't apply to you. Have fun running them, though...)
- epgui 3y agoThat is absolutely and totally true, but 99.9999% of engineers are probably working on things like web apps or other high-level code. The argument for FP was never that it was perfectly well-suited to every application-- merely that it was better-suited for your "typical" engineering tasks of writing business logic. FP, proof languages, and logic programming, are also all uniquely well-suited in situations that require correctness and formal verification (safety, aerospace, testing, etc). To make a very broad, sweeping statement: if your project has a `node_modules` or a `venv`, then FP is the medicine you didn't know you needed. If you're writing low-level metal code / assembly, then you should already know you're not the target audience.
- dartos 3y agoThe software world is larger and more diverse than you think. Maybe on HN 99% of people work on web. In reality probably like 70%
- jjav 3y ago> I’d rather a language is designed to accommodate the human mind Agreed, but is FP that? When I write instructions to someone who does not know how to do something (like for my young kid or an aging parent on using some tech they're no familiar with) it will be strictly procedural. Step 1 do this, then step 2 do that, etc.