3 ms·
I don't think the author's intent was to argue completely against cnstructors. At least to me this reads more like: here are some pros, here are some cons. But
by stinos 7y ago
I don't think the author's intent was to argue completely against cnstructors. At least to me this reads more like: here are some pros, here are some cons. But you're right: in some languages some aspects are better than in others. Take the vector constructor example for instance: that's not really just a case against constructors. The exact same, i.e. not knowing which argument does what, can be a problem in any language with no named arguments, and not just for constructors but for anything which takes arguments. But is that a problem? Do I really need to know the order of arguments of everything? Nope, it's 2019, my editor and internet know the answer.
- Sharlin 7y agoThe point is that with (unnamed) constructors the problem is exacerbated. There’s a reason functions are named descriptively.