Ola Fosheim Grøstad
Ola Fosheim Grøstad
> I assume the `]` in your example syntax is a typo? Yes, thanks. (fixed)
> You could also argue that this `self`-as-first-argument syntax is more consistent, since `self` is not really a "deduced" parameter in the same sense as the type parameters Yes, and...
> While this is true of C++ code, I'm unconvinced that it is a good default behaviour as it means programmers should always consider member packing/padding when creating their interfaces...
Try to avoid "stealing" names that are commonly used in algorithms: head, tail, next, prev, iter, etc…
> * What requirements does `tail return` impose on the caller and the callee? Tail call elimination only works if no code at all is executed after the tail call,...
> * I think we should generate an error if any code would execute after the tail call. If you can move the constructor/destructor pair out of the resulting loop...
The ability to adapt a tool to your needs is an important quality (as long as correctness isn't affected). If programmers want to enforce things being declared before used as...
> If you would change them like this, wouldn't it be even more consistent? It would indeed be more consistent, which always is a good thing, but what would happen...
It might be possible to create a wrapper that could make that work, e.g. `set(wrapper(pointer_type))`, but most C++ programmers would be terribly confused by it.
The C-idiom is `for(;;){ … }`, but I guess `for { … }` is a possibility… I've seen some that use the macro 'forever' so you get `forever {…}` :-)