4 ms·
I'd rather have language features to cover those use cases than a preprocessor. As an example of what I mean, in Java and C++, class properties are typically a
by MereInterest 6y ago
I'd rather have language features to cover those use cases than a preprocessor.
As an example of what I mean, in Java and C++, class properties are typically accessed by getters and setters, since you might want to change the internal structure of a class without changing the interface. In Python and C#, you can get the same benefit by changing a member variable to a property. As a result, the boilerplate of getters/setters isn't needed.
- throwaway_pdp09 6y agoErm, I get this, but I want a PP because the language doesn't do what I want.
- MereInterest 6y agoIn that case, why not fix the language, rather than adding an entirely separate subsystem to the language?
- throwaway_pdp09 6y agoBecause I'm not in a position to. However, that's pretty well what I said elsewhere, so we're in agreement.
- MereInterest 6y agoMakes sense. For me, I see the preprocessor as a fundamental part of the language, since that is how it is implemented in C and C++. I was figuring that it would take just as much effort to implement/change a preprocessor as it would to change the core language.