|
|
|
|
|
by WorldMaker
183 days ago
|
|
Though, contextual keywords are a thing going back to the original design of C# 1.0 even. The nearest and most obvious example to the topic at hand is that `value` is only reserved in situations such as a property setter, and always has been. You don't need `var @value = …` in the vast majority of C# code and can just write `var value = …` just about anywhere but inside a `set { }` block. Part of why C# has been so successful in introducing new contextual keywords is that they've been there all along. I think C# 1.0 was ahead of the game on that, and it's interesting how much contextual keywords have started being a bigger tool in language design since C# (all of ES3 of ES4 and some of ES5 were predicated on keywords are always keywords and ES6/ES2015 is where you first start to the shift in JS to a broader contextual keyword approach which seems equal parts inspired by C# as not). |
|