News for hackers. Stuff that matters.
Re:The Spiral Language by moomin on Thursday July 12, 2018 @07:35PM (#17519486)
Well, this is pretty interesting. I’ve been wondering when someone would finally put optimisation semantics into the code.
Re:The Spiral Language by weberc2 on Friday July 13, 2018 @08:00AM (#17522129)
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.
Re:The Spiral Language by moomin on Friday July 13, 2018 @11:47AM (#17523930)
“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.