From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ab66185f2bca0483 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-16 08:16:45 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!snoopy.risq.qc.ca!newsfeed.news2me.com!newsfeed2.easynews.com!newsfeed1.easynews.com!easynews.com!easynews!uunet!dfw.uu.net!ash.uu.net!world!news From: Robert A Duff Subject: Re: Extension of non-limited type needs limited component User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Sender: news@world.std.com (Mr Usenet Himself) Message-ID: Date: Sat, 16 Nov 2002 16:15:41 GMT Content-Type: text/plain; charset=us-ascii References: <2dbd76f3.0211130203.7d2d14fd@posting.google.com> <2dbd76f3.0211140126.5d233e41@posting.google.com> <3vb7tug4h99mmalcn0l5ul18cu0ui6i458@4ax.com> <6bd9tuc40p68a86rlur3hai1qlv54i8985@4ax.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Organization: The World Public Access UNIX, Brookline, MA Xref: archiver1.google.com comp.lang.ada:30984 Date: 2002-11-16T16:15:41+00:00 List-Id: "Dmitry A. Kazakov" writes: > All that are more or less decoupled things. Why should we tie all of them ^^^^^^^^^^^^ > under one roof? Less, I'd say. ;-) They are all closely related to whether you can copy the thing. To answer my question properly, you would have to explain exactly when each of the things I mentioned should be allowed. That's not easy. No, I don't expect anybody to do all that work for an informal usenet discussion. ;-) >...[However, I am afraid, that to correctly deal with it one > would need multiple dispatch anyway.] I like the idea of multi-dispatch, but all of the languages I've seen that support it seem confusing and/or error-prone. You need a rule that makes it predictable which method(s) will be called in every case. Not just predictable in a formal sense, but predictable by mere mortal programmers -- i.e. the programmer's guess should match what the compiler actually does. And you need a way to prevent ambiguities -- cases where two different methods are "reasonable" should be forbidden, preferably at compile time. And you need a way to organize the code -- with single dispatch, you can put the "methods" with the "type" (or "class" or whatever). - Bob