On Wednesday, 19 April 2017 21:51:08 UTC+2, Aaron Meurer wrote: > > Performance is a valid concern. We should definitely check that. > > The __slots__ part I don't know. That could probably be done differently. > > I didn't like that part too. Has anyone a better idea?
Regarding the implementation itself, how would you do it? The ability > to make Mul or Add do custom stuff for custom objects is a very > commonly requested feature. Would you keep it unimplemented, or do it > some other way? > Yes, we really need this feature. Ideally we want to extend such mechanism to functions as well. > Aaron Meurer > > On Wed, Apr 19, 2017 at 3:46 PM, Ronan Lamy <[email protected] > <javascript:>> wrote: > > Le 19/04/17 à 19:00, Francesco Bonazzi a écrit : > >> > >> > >> > >> On Wednesday, 19 April 2017 17:05:08 UTC+2, Ronan Lamy wrote: > >> > >> Le 18/04/17 à 21:28, Francesco Bonazzi a écrit : > >> > I'm gonna merge this PR soon: > >> > > >> > https://github.com/sympy/sympy/pull/12508 > >> <https://github.com/sympy/sympy/pull/12508> > >> > >> Wow, that's horrifying! Good luck maintaining it! > >> > >> > >> Why is it horrifying? > > > > > > Well, using __new__ in the first place is a big WTF (and yes, I know > that > > sympy is pretty much stuck with it forever), but layering a hook to a > whole > > new programming paradigm inside it is evil genius. Bonus horror points > for > > introspecting __slots__ and doing such fundamental changes to solve a > minor > > issue. > > > > And BTW, has anybody checked the impact on performance? IIUC, that adds > a > > non-trivial amount of work to every Add or Mul instantiation. > > > > That being said, don't mind me. As long as I don't have to debug it, > that > > code won't bother me. > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "sympy" group. > > To unsubscribe from this group and stop receiving emails from it, send > an > > email to [email protected] <javascript:>. > > To post to this group, send email to [email protected] > <javascript:>. > > Visit this group at https://groups.google.com/group/sympy. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/sympy/086034c8-3ad1-4059-7424-d358f3de9b92%40gmail.com. > > > > > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/03cf6d1f-83f6-4844-9b5c-753e947f90ce%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
