Jul 16, 2015; 15:21
Steve Piercy - Website Builder
Re: Multiple Dispatch in 9.3
Jul 16, 2015; 23:35
Ke Carlton
Re: Multiple Dispatch in 9.3
Jul 16, 2015; 17:00
Steve Piercy - Website Builder
Re: Multiple Dispatch in 9.3
And that, good sir, is an example of sufficient content that
should go into a change note.
This is an example of a suboptimal change note:
http://www.lassosoft.com/Lasso-9-3-release-notes
* Improved multiple dispatch rules
That's what I'm bitching about, as usual. /me does the
"Documentation Dance" to the likes of the Microsoft Steve
Ballmer "Developers Developers Developers Developers Monkey Boy Dance".
--steve
On 7/16/15 at 11:35 PM, ke@zeroloop.com (Ke Carlton) pronounced:
>Previously there was ambiguity in terms of which signature would be called
>when there was conflicting signatures.
>
>Now when there's a conflict Lasso 9.3 uses the most recently defined
>signature * always * so the ambiguity has been removed.
>
>So with multiple matches, for example:
>
>define example(p::trait_keyedforeach) => 'A'
>define example(p::trait_foreach) => 'B'
>
>Both of these match: example(map) — before 9.3 you had no control over
>which would trigger. A degree of luck was involved.
>
>Now you do — the most recently definition will be used (in this case B).
>
>The other pointer with -named parameters is that they are essentially
>ignored in terms of signature matching. This has been the case since day
>zip:
>
>"Keyword parameters cannot be used to uniquely identify a method. A method
>taking, for example, two required parameters and a certain set of keyword
>parameters will be overwritten by a new method that requires the same two
>parameters and an entirely different set of keyword parameters." —
>http://lassoguide.com/language/methods.html?highlight=signatures#defining-methods
>
>So it's possible that in Knop you have conflicting signatures due to the
>above (named parameters are ignored) and are relying on the previous ambiguity
>for Lasso to call such signatures.
>
>Ke
>
>
>
>On Fri, Jul 17, 2015 at 10:21 AM Steve Piercy - Website Builder <
>Web@stevepiercy.com> wrote:
>
>>On 7/16/15 at 5:16 PM, brad@monkware.com (Brad Lindsay) pronounced:
>>
>>>On July 16, 2015 at 4:52:40 PM, Steve Piercy - Website Builder
>>>(web@stevepiercy.com) wrote:
>>>>
>>>>9.3 won't run some of my code due to the changes in rules for
>>>>multiple dispatch from 9.2, which are not documented but which a
>>>>colleague was kind enough to explain to me.
>>>
>>>The documentation for the dispatch process:
>>>http://lassoguide.com/language/methods.html#the-dispatch-process
>>>
>>>As far as I know, those rules haven’t changed. I do know
>>>there were some bugs in 9.2 that allowed for things to work
>>>that didn’t line up with this documentation, and some bugs
>>>that required method definitions to be defined in a certain
>>>order. I know 9.3 has fixed some (if not all?) of these bugs.
>>
>>Sorry, I meant to say "changes in *the enforcement of* rules".
>>There's no example of what used to work and how to fix it. An
>>explicit change note would have been sufficient, or better yet,
>>a Migration Guide.
>>
>>>I would be very interested to know of anything that you can’t
>>>get to work that should based on the documentation above. (I
>>>haven’t run into any multiple-dispatch issues when running my
>>>9.2 code in 9.3.)
>>
>>Knop requires a rewrite to comply with the new enforcement of
>>rules before it will run on 9.3. I've set a few milestones for that.
>>https://github.com/knop-project/knop/milestones
>>
>>There's many examples in Knop of how not to define methods in
>>9.3, but would work just fine under 9.2, specifically a method
>>that merely serves as an "alias" to another, where the
>>signatures are identical except one uses positional parameters
>>and the other uses keywords.
>>
>>This has further implications, too. If you have code that
>>relies on the methods that rely on the buggy behavior in 9.2,
>>then you may have to rewrite that code as well.
>>
>>--steve
>>
>>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>Steve Piercy Website Builder Soquel, CA
>><web@StevePiercy.com> <http://www.StevePiercy.com/>
>>
>>
>>#############################################################
>>
>>This message is sent to you because you are subscribed to
>>the mailing list Lasso Lasso@lists.lassosoft.com
>>Official list archives available at http://www.lassotalk.com
>>To unsubscribe, E-mail to: <Lasso-unsubscribe@lists.lassosoft.com>
>>Send administrative queries to <Lasso-request@lists.lassosoft.com>
>
>#############################################################
>
>This message is sent to you because you are subscribed to
>the mailing list Lasso Lasso@lists.lassosoft.com
>Official list archives available at http://www.lassotalk.com
>To unsubscribe, E-mail to: <Lasso-unsubscribe@lists.lassosoft.com>
>Send administrative queries to <Lasso-request@lists.lassosoft.com>
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy Website Builder Soquel, CA
<web@StevePiercy.com> <http://www.StevePiercy.com/>
#############################################################
This message is sent to you because you are subscribed to
the mailing list Lasso Lasso@lists.lassosoft.com
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <Lasso-unsubscribe@lists.lassosoft.com>
Send administrative queries to <Lasso-request@lists.lassosoft.com>