3 ms·
Isn't this already happening, though, on a low-level (i.e. ASM) ?
by stingraycharles 10y ago
Isn't this already happening, though, on a low-level (i.e. ASM) ?
- smrq 10y agoBut the abstraction there is a lot more battle-hardened than your business logic at $COMPANY. Not that compiler bugs never happen, but it's comparatively quite rare.
- KirinDave 10y agoYes, but the domain of your computer memory is surprisingly disjoint from the domain of your business logic, and that's really what matters here. Consider a counter-example, where calling a functional method that takes an object and creates a copy with a new field updated (a classic pattern for introducing immutability to a mutable environment). What if internally the constructor calls a log call or increments a shared resource tally? Not unreasonable, but in a functional context an update now has weird side effects that creates misleading results.
- nickpsecurity 10y agoCakeML, a Standard ML subset, can compile to ASM with mathematical proof of correctness. You know your ASM will be what you expected it to be. There's also tools like QuickCheck, QuickSpec, and SPARK that can automate lots of analysis. Tons of work like this in compilers and static analysis with smart people always improving them. Good chance your business logic will not be handled that well. So, good to structure it in a way to facilitate easy analysis or optimization by tools that currently exist or are in development. You get long-term benefits.