3 ms·
That would be impressive, could someone check?
by jjgreen 5y ago
That would be impressive, could someone check?
- SekstiNi 5y agoUnfortunately, but expectedly, it cannot reason about it [1]. Even if it could I'm not sure it would be allowed to elide the allocation(s). [1] https://godbolt.org/z/63xEcfaEE https://godbolt.org/z/63xEcfaEE
- jjgreen 5y agoPity, if it ever does then I'll put aside my distaste for the whole "curl <url> | sh" thing and learn the language.
- h2odragon 5y agoThe metaphysics of that are going to be interesting. "Do what I mean" programming meets all the stories about why one shouldn't accept bargains with fairies or djinn. "I can't let you use `strcpy()` there, Dave" is the least of it.
- coldtea 5y agoNo need to check, that would be almost impossible, unless they could read the programmer's mind for the intent...
- AnIdiotOnTheNet 5y agoWhich I think is the argument behind declarative languages. If we can encode the intent precisely, then at least in theory the compiler can find the optimal solution for the given architecture and other constraints. Of course in practice that probably requires strong AI to accomplish.