> On 31 Aug 2016, at 01:57, Robert Virding <[email protected]> wrote: > > I have missed most of the discussion but it feels strange that a function in > Kernel, Kernel.compare/2, results in calls to a protocol. For me Kernel feels > like being at the very base and should not call anything outside it, > irrespective of whether it is part of elixir core or not. > > Robert
While I understand this sentiment, there are already a lot of functions in Kernel calling protocols - inspect/2 with the Inspect protocol, to_string/1 with String.Chars protocol, to_charlist/1 with List.Chars, etc. Having a compare/2 that calls Comparable protocol seems like a good fit. Michał. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/340322FD-FF2C-4CEC-92DE-14347E6881E0%40muskala.eu. For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: Message signed with OpenPGP using GPGMail
