Michał, I think the issue with your proposed approach is precedence. <+> and <*> need to have different precedences and where should we put those operators compared to all others?
*José Valimwww.plataformatec.com.br <http://www.plataformatec.com.br/>Founder and Director of R&D* On Thu, May 17, 2018 at 1:03 PM, Michał Muskała <mic...@muskala.eu> wrote: > I wonder if it would make sense to have a whole suite of <_> wrapped math > operators. I could imagine, for example, the Decimal library implementing > them and you could import to the decimal calculations easily without > sacrificing the regular math operators. > > Michał. > > On 17 May 2018, 12:52 +0200, José Valim <jose.va...@gmail.com>, wrote: > > Thanks for the clarification. > > Let's go ahead and add <*>. Regardless of this use case, I think it fits > the current set of custom operators. > > > > *José Valim* > www.plataformatec.com.br > Founder and > *Director of R&D* > > On Thu, May 17, 2018 at 12:42 PM, Stas Versilov <stas.versi...@gmail.com> > wrote: > >> The problem is that other math operators used on matrices are only in >> element-wise form (+, -, /, *), so, usual math operators are enough for >> this. >> But multiplication can be element-wise or dot-product, hence, we need two >> separate operators. >> >> I saw Swift guys using <*> for dot-product, seemed like a good choice for >> me. >> >> >> >> >> On Thursday, May 17, 2018 at 1:24:28 PM UTC+4, José Valim wrote: >>> >>> Hi Stas, >>> >>> Given that we already have <|>, I don't see a problem with adding <*>. >>> My only question is why choose dot product to have an operator? Wouldn't >>> matrex end-up requiring other operators anyway? If we add <*>, how would >>> those other operators look like in terms of consistency? >>> >>> >>> >>> *José Valim* >>> www.plataformatec.com.br >>> Founder and >>> *Director of R&D* >>> >>> On Thu, May 17, 2018 at 11:10 AM, Stas Versilov <stas.v...@gmail.com> >>> wrote: >>> >>>> Hello! >>>> >>>> I'am developing a matrix manipulation library for Elixir ( >>>> https://github.com/versilov/matrex) >>>> and it would be really nice to have <*> operator, so that it could be >>>> overriden for matrices dot product (or element-wise multiplication). >>>> >>>> Is it possible to add it? >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "elixir-lang-core" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to elixir-lang-co...@googlegroups.com. >>>> To view this discussion on the web visit https://groups.google.com/d/ms >>>> gid/elixir-lang-core/b7f939f4-50a1-49f7-bcc6-c82405c1eb33%40 >>>> googlegroups.com >>>> <https://groups.google.com/d/msgid/elixir-lang-core/b7f939f4-50a1-49f7-bcc6-c82405c1eb33%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "elixir-lang-core" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to elixir-lang-core+unsubscr...@googlegroups.com. >> To view this discussion on the web visit https://groups.google.com/d/ms >> gid/elixir-lang-core/8cebaaeb-fe12-4601-a3ac-5af683304fc2% >> 40googlegroups.com >> <https://groups.google.com/d/msgid/elixir-lang-core/8cebaaeb-fe12-4601-a3ac-5af683304fc2%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- > You received this message because you are subscribed to the Google Groups > "elixir-lang-core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to elixir-lang-core+unsubscr...@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/elixir-lang-core/CAGnRm4K8bztEvVs6MPMKY53mia1Mw > FtWMFtnHPeysQxo6_GgsA%40mail.gmail.com > <https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4K8bztEvVs6MPMKY53mia1MwFtWMFtnHPeysQxo6_GgsA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "elixir-lang-core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to elixir-lang-core+unsubscr...@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/elixir-lang-core/ad3ac929-1813-46da-8377-2a69f7b5dd60%40Spark > <https://groups.google.com/d/msgid/elixir-lang-core/ad3ac929-1813-46da-8377-2a69f7b5dd60%40Spark?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4LSxXmDsCRpYsKp6yrGetoi7Akknsfxd1LS5WGfao6QyQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.