Function types
When declaring a function, it is possible to flag it as virtual, const, etc. before the ->.
It is not possible to declare a inline or static function this way and instead one has to use -> (inline float) f.e.
I think it would be nice to add static and inline to the list of possible function types before the -> imo.
The rationale here is that stuff that should go after the argument list is specified, fittingly ;), after the c-mera argument list. The case of virtual makes this weird. We opted to allow that so we could write pure virtual -> int which is not as scattered as pure -> (virtual int).
I would not be hard against adding more cases for this, when it is clear where they should go, but it feel a little like adding unnecessary bloat... I'll check the code to see how bad it would be to add this.
@lispbub Do you have an opinion on this?
Well, it's a valid point.
static and inline are not related to the return type but to the actual function.
But allowing arbitrary specifier-placement seems odd too.
(function foo () <function specifier> -> (<type specifier> <type>) ...?
With the exception of virtual my intention was to reflect the placement of those specifiers in C++. However, I see that the other point of view is also valid. In that case we should strictly separate the two kinds of specifiers, such that, e.g., virtual would not be valid in the return type. Any thoughts on that? I'm still not sure which one is the better solution.