2 ms·
> Already the introduction of a keyword like 'known' shows that the simplification is not as simple. Don't think that one is actually needed, simple static ana
by UncleEntity 9y ago
> Already the introduction of a keyword like 'known' shows that the simplification is not as simple.
Don't think that one is actually needed, simple static analysis should be able to tell one variable is just an alias of another -- which (presumably) they already do to figure out the variable types.
The reasoning behind it is also kind of confusing, used to tell the preprocessor the variable is in local scope as opposed to...?
--edit--
Or maybe it's used for class local variables?
- Yoric 9y agoI actually suspect that `known` solves an existing problem of C++, in which you can't be sure whether a name is that of an argument, a local variable or a field. Problem solved (at least partially) in other languages by requesting the `this` or `self` to be explicitly mentioned.