Re:Using attrs for everything in Python
by crdoconnor on Friday August 26, 2016 @03:56PM
(#12368880)
>To someone who uses Python every day, the extra cognitive load of `attr` is more than made up for by all the boilerplate it eliminates.
That's funny because the first thought I had when reading this was "this does not eliminate nearly enough boilerplate to justify using that much magic".
>But for beginners, behind-the-scenes magic is a real turn off.
It's a turn off for beginners and experts but a turn on for intermediates.
To someone who uses Python every day, the extra cognitive load of `attr` is more than made up for by all the boilerplate it eliminates. But for beginners, behind-the-scenes magic is a real turn off.
I think that making `attr` an optional library is a fair compromise, but perhaps it would be a good idea to add a note to the library reminding the programmer not to use it if the code is likely end up in the hands of novices.