A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/attachments/20171012/3cc544b4/attachment.html below:

<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 11, 2017 at 10:33 PM, Mike Miller <span dir="ltr"><<a href="mailto:python-dev@mgmiller.net" target="_blank">python-dev@mgmiller.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">(Apologies for reviving a dead horse, but may not be around at the blessed time.)<br>
<br>
As potential names of this concept, I liked record and row, but agreed they were a bit too specific and not quite exact.  In my recent (unrelated) reading however, I came across another term and think it might fit better, called an "entity."<br></blockquote><div><br></div><div>I'm not familiar with ER modelling but I would advise against using the term "entity", as it has, in domain-driven design (DDD) a very specific meaning:</div><div><br></div><div>"An object that is not defined by its attributes, but rather by a thread of continuity and its identity." (from <a href="https://en.wikipedia.org/wiki/Domain-driven_design#Building_blocks">https://en.wikipedia.org/wiki/Domain-driven_design#Building_blocks</a>)</div><div><br></div><div>See also the more general Wikipedia definition "An entity is something that exists as itself, as a subject or as an object, actually or potentially, concretely or abstractly, physically or not." (<a href="https://en.wikipedia.org/wiki/Entity">https://en.wikipedia.org/wiki/Entity</a>).</div><div><br></div><div>In the context of DDD, entities are usually opposed to value objects: "An object that contains attributes but has no conceptual identity. They should be treated as immutable.". (<a href="https://en.wikipedia.org/wiki/Domain-driven_design#Building_blocks">https://en.wikipedia.org/wiki/Domain-driven_design#Building_blocks</a>)</div><div><br></div><div>Attrs, and by extension the dataclass proposal (I guess), provide some support for both: </div><div><br></div><div>- Providing support for quickly constructing immutable objects from a bag of attributes, and providing equality based on those attributes, it helps implement Value Objects (not sure much more is needed actually)</div><div><br></div><div>- By supporting equality based on some "primary key", it will also help with maintaining the concept of "equality" in entities.</div><div><br></div><div>It would be great if the dataclass proposal could help implement DDD technical concepts in Python, but its terminology should not conflict the DDD terminology, if we want to avoid confusion.</div><div><br></div><div>Cheers,</div><div><br></div><div>  S.</div><div><br></div></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Stefane Fermigier - <a href="http://fermigier.com/" target="_blank">http://fermigier.com/</a> - <a href="http://twitter.com/sfermigier" target="_blank">http://twitter.com/sfermigier</a> - <a href="http://linkedin.com/in/sfermigier" target="_blank">http://linkedin.com/in/sfermigier</a><br>Founder & CEO, Abilian - Enterprise Social Software - <a href="http://www.abilian.com/" target="_blank">http://www.abilian.com/</a><br>Chairman, Free&OSS Group / Systematic Cluster - <a href="http://www.gt-logiciel-libre.org/" target="_blank">http://www.gt-logiciel-libre.org/</a><br>Co-Chairman, National Council for Free & Open Source Software (CNLL) - <a href="http://cnll.fr/" target="_blank">http://cnll.fr/</a><div>Founder & Organiser, PyData Paris - <a href="http://pydata.fr/" target="_blank">http://pydata.fr/</a><br></div><div>---</div><div><div>“You never change things by ï¬ghting the existing reality. To change something, build a new model that makes the existing model obsolete.” <span style="font-size:12.8px">— R. Buckminster Fuller</span></div></div><div><br><br></div></div></div></div></div></div></div></div>
</div></div>

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4