News for hackers. Stuff that matters.
Re:I use Attrs instead of Pydantic by ospider on Thursday August 26, 2021 @04:41AM (#28312189)
For myself, better code completion is enough to lure me into the world of fully type-annotated python. I don't understand what you mean by saying "cargo cult", please enlighten me.
Re:I use Attrs instead of Pydantic by jampekka on Thursday August 26, 2021 @04:47AM (#28312254)
Cargo cult probably refers to doing something based on superficial assesment without understanding what is actually done. Originally refers to problems in science. https://calteches.library.caltech.edu/51/2/CargoCult.htm
Re:I use Attrs instead of Pydantic by nooorofe on Thursday August 26, 2021 @04:37PM (#28320368)
> fully type-annotated python

When I do that, I ask myself: "how is it different from writing Java code?". I don't have a clear answer. It becomes almost as verbose as Java. Java has better type validation (doesn't compile on mistake); it is faster (at least some payback for verbosity); real type system has additional advantages, for example using types as part of method signature.