3 ms·
Programming languages already use contextual parsers. C# and Swift both allow you to re-use some keywords as identifiers, function names, etc and use context to
by xenadu02 9y ago
Programming languages already use contextual parsers. C# and Swift both allow you to re-use some keywords as identifiers, function names, etc and use context to disambiguate.
Both inherited the restricted list from C so for legacy reasons they prohibit those keywords from being used as identifiers, but newly introduced keywords are always contextual due to compatibility concerns.