Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think it's more interesting that they're in the type system. C has had inline pragmas for decades now, and one might also consider memory allocation semantics to be optimization semantics. Or more generally, one might consider any low-level semantics to be optimization semantics. The neat thing about Spiral isn't that it has 'optimization semantics', but rather that they integrate neatly into the type system.


“Inline”, though, is a request, like a hint. It doesn’t _enforce_ it. And this is my problem with most optimisations: you can’t guarantee they’ve happened. Putting them in the type system is definitely the right way of doing this.

constexpr, however, does seem to be enforced.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: