2 ms·
Well structs, interfaces do allow the user to create abstractions, in quite a nice way I think - it's very bare-bones compared to say inheritance in C++, and d
by grey-area 10y ago
Well structs, interfaces do allow the user to create abstractions, in quite a nice way I think - it's very bare-bones compared to say inheritance in C++, and deliberately so.
the languages cheats and does things the users is not allowed to do, like append or delete functions.
I agree and find this slightly distasteful too, but I think it was borne of pragmatism. There is definitely also a cost to language purity and parsimony, and I'm glad they're a little pragmatic, but collections are the only area I've felt the language is seriously lacking in elegance (maybe option types would be nice too).
Personally I find it quite pleasant to create abstractions in, those grips notwithstanding.