Coding since 11yo, that makes it over 30 years now ~~~
Have a PhD in Comp Sci ~~~
Love to go on bike tours ~~~
I try to stay as generalist as I can in this crazy wide place coding is at now.
I’ve got a useful regex substitution for situations like this... s/\b(\w+) (rocks|sucks)\b/\1 is a tool that is useful for some things but not everything. It’s a power drill or tape measure, not a religion or sports team. Use \1, but avoid deriding or evangelizing it/
Works for pretty much anything to do with coding 🤓
As for classes, they’re a great way to ensure objects implement their advertised interfaces, which can keep things nice and clean code-wise if not overdone, and they have good implementations on most any modern language.
As you were saying, it works out better to think of them as “objects with the same behaviour” than “objects of the same intrinsic type” (whatever that means).
I’ve got a useful regex substitution for situations like this...
s/\b(\w+) (rocks|sucks)\b/\1 is a tool that is useful for some things but not everything. It’s a power drill or tape measure, not a religion or sports team. Use \1, but avoid deriding or evangelizing it/
Works for pretty much anything to do with coding 🤓
As for classes, they’re a great way to ensure objects implement their advertised interfaces, which can keep things nice and clean code-wise if not overdone, and they have good implementations on most any modern language.
As you were saying, it works out better to think of them as “objects with the same behaviour” than “objects of the same intrinsic type” (whatever that means).
Thanks for the thought provoking post Dimitri!
You're welcome. I love making people think :)