3 ms·
1. That's true, I didn't mean to imply that transmute is equivalent, there would definitely be benefits to the feature you're suggesting. But it also brings add
by nickmqb 8y ago
1. That's true, I didn't mean to imply that transmute is equivalent, there would definitely be benefits to the feature you're suggesting. But it also brings additional complexity of course.
6. Sorry, I totally missed that part of your comment! A language server won't help in that case. At least wrt to return types though, you're always allowed to specify them for clarity. I can imagine building some tooling that automatically infers and adds explicit return type annotations if they are missing. You could run this as a commit hook if you wanted to enforce that as a coding standard.
8. Right, I was referring to the IFDEF DEMO case (assuming it's used to implement straightforward feature flags). I agree that for the other cases that you mentioned we'd need something else. For now, for some situations, you could compile with different files (e.g. gfx_opengl.mu, gfx_directx.mu, etc.), though it's a pretty crude solution, especially if you want to combine conditions (e.g. Linux + OpenGL). Definitely thinking about this.