From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED.QnTRC4x3WOQxzaUUaj2zKA.user.gioia.aioe.org!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Multiple dispatch in Julia Date: Thu, 12 Nov 2020 08:48:49 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <6faed833-462a-4b4b-b555-9a632fd7caddn@googlegroups.com> NNTP-Posting-Host: QnTRC4x3WOQxzaUUaj2zKA.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.2 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader02.eternal-september.org comp.lang.ada:60572 List-Id: On 12/11/2020 08:12, Jerry wrote: > I'm curious to know what Ada folks think about this discussion about Julia, especially the extended comment about multiple dispatch. What discussion? ----------- Like other dynamic languages claiming that they have multiple dispatch, Julia deploys run-time type matching for the target method. This is all you need to know. Because the most important requirement of properly designed dispatch (multiple or not) is: dispatch may never fail. It is very difficult to satisfy already with multi-methods. BTW, I am not sure, but it seems that Julia has only multi-methods and no full multiple dispatch. Full multiple-dispatch is even harder to approach. P.S. Multi-method dispatch is something like X + Y. Both arguments and the result are from the same type hierarchy. Full multiple dispatch is like Print (X, Y). Arguments are from different hierarchies. P.P.S. Ada in fact has multi-method dispatch. It is defined so that when tags of controlling arguments are different you get an exception ARM 3.9.2 (16). Which, yes, violates the principle above, but nobody ever pretended that Ada had multiple dispatch in the first place. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de