5 ms·
My first reaction to $class was the following: since we are talking about metaclasses, why not use that name instead, that is "metaclass" in place of "$class"?
by stephen82 9y ago
My first reaction to $class was the following: since we are talking about metaclasses, why not use that name instead, that is "metaclass" in place of "$class"?
- stinos 9y agoNot sure what you mean exactly, but $class is just an example, you can also have $interface $sometypeofstruct $unmutablevaluetype etc so prefixing that all with 'meta' would be a mess
- scott_s 9y agoIn the proposal, '$class' is actually the proposed keyword for introducing a metaclass; you won't continue to use '$' for all of the classes created from that metaclass. stephen82 is suggesting that we use the keyword 'metaclass' instead, which I probably prefer.
- imron 9y agoI would guess it's because someone might be using the name metaclass as an identifier in their code and therefore appropriating it as a keyword would potentially break programs. $class on the other hand is guaranteed not to conflict with any existing code.