3 ms·
Now I understand. Thank you! > I think, personally, I'd've called the initial class ScoreGuts or something Well, maybe the point is that the original class be
by 6t6t6 11y ago
Now I understand. Thank you!
> I think, personally, I'd've called the initial class ScoreGuts or something
Well, maybe the point is that the original class becomes "useless" once it has been "decorated"; so it doesn't make sense that it has its own name. But it's is also true that, once you get used to program using FP style, mutating variables like this feels "weird".
- mst 11y agoYeah, that would seem like the motivation, but it feels a bit weird to me too. It occurs to me that you could probably do something like Score = do_the_decoration((function () { class Score ... { ... } return Score; )()); but that's not exactly 100% better, just weird to a different subset of people :)
- 6t6t6 11y ago> but that's not exactly 100% better, just weird to a different subset of people Lol!