On Mon, Apr 19, 2021 at 4:03 PM Andy Bach <andy_b...@wiwb.uscourts.gov> wrote:
>
> Very impressive and complete explanation, thanks!

Thanks for that feedback, it's very helpful. I enjoy trying
to help, but it's hard to ensure I've conveyed a tone of
respect for whoever I'm replying to, at the same time
as trying to keep things sufficiently succinct and clear
for them, and for what I'm thinking is the "greater good".

> > I'm inclined to view it as pretty good. I also think it
> > might be seriously hard to improve.

> could this one append of those (my favorite kind) leading questions
> "Did you mean to pass ...?"

Maybe.

But when I thought about that option my intuition was that it would
likely end up making the error message weird and noisy for the
common case (99.9% of the time?) where the mismatch in args
had nothing to do with quoting. And that would imo be a significant
negative. Furthermore, the constraints of word count in an error
message would inevitably lead to a lost chance to encourage
acceptance of the underlying gift, as explained in my Note below.

That's why I suggested the as-yet untapped potential of connecting
errors to doc pages which can elaborate at length to explain a given
message in greater depth, and discuss any gifts that are associated
with a given WAT, and maybe link to GH issues discussing it all, etc.

Note
====

> As we're looking a known "trap"

Imo the first two sentences in the preamble for that page are spot on
imo, but the last paragraph is not.

To see why I think that, consider what I think is forgotten:

* Raku "traps" are mostly beautiful gifts.

* It is beautiful that Larry created these beautiful gifts.

* It is wise to encourage acceptance of these beautiful gifts.

----

The final paragraph reads as if the writer is not aware of this:

> During the making of Raku great pains were taken to get
> rid of warts in the syntax.

This is one sided thinking, lacking the balance and insight
that comes from suitable nuance.

cf 
https://www.reddit.com/r/perl6/comments/8s2vl8/perl_6_colonpairoscopy/e12tf1r/

> When you whack one wart, though, sometimes another pops up.

This is an inherently negative take on Larry's neutral waterbed theory.

https://en.wikipedia.org/wiki/Waterbed_theory

The "whack-a-wart" notion doubles down on the sense that there's
been a design failure, and the implication that whack-a-wart is a
symptom of this imagined design failure.

> So a lot of time was spent finding the minimum number of warts

I see this as reflecting good design, and taking care to reach for better.

> or trying to put them where they would rarely be seen.

Yes and no. In many (most?) cases the opposite is true -- it's often
more important to deliberately let them be where they are glaringly
obvious and easily encountered as a designed-in teachable moment.

You can't make evolved things nice in general without them being
warty in particular places. You also have to accept that some gifts
will initially be experienced by those who encounter them as warts.

And sometimes it's appropriate to choose when to help tune folks' ERN.

https://en.wikipedia.org/wiki/Error-related_negativity

cf https://www.nntp.perl.org/group/perl.perl6.users/2018/09/msg5418.html

> Because of this, Raku's warts are in different places than you may
> expect them to be when coming from another language.

This is true. :)

Who would think that quoting keys would control whether arguments
were named or positional?

.oO (It's really useful if the compiler can check at *compile-time* if
named arguments don't have typo'd keys. And it's really useful that one
can write arbitrary strings as keys that do not adhere to the language's
rules for named argument names. But if a dev doesn't know Raku, they
won't be thinking about those two things. But then again, if they are using
Raku, it's arguably a good thing for them to understand about named args
sooner rather than later. Also, what to do about interpreting pairs, when
used as arguments, as either named arguments or positional arguments?
I wonder if a nice DWIM based on whether the key is quoted or not, with
a reasonable corresponding WAT, is the way to go?)

Aiui, the foregoing thought bubble outlines @Larry's thought process.

--
raiph

Reply via email to