“? doesn't imply truth it implies a question”

This is an interesting point actually. pmurias++ expressed the same idea.

I find it hard to understand this fully, but I guess I'll have to accept that
there are different ways to think about it :)

For example:
“The ? prefix asks an expression whether it's True or False”
If “?” asks a question, then what about “!” ? Well, let's say it aggressively
disagrees. Then we have optional and required parameters. ? is doubt and ! is a
demand? Ok. And then we have:
“‘:foo’ sets foo to True. ‘:!foo’ sets it to False”
Well, these are kinda arbitrary, and ! doesn't really follow the ideas
mentioned above.

And then we also have ?? !!, where again we have ? as kinda an opposite of !.

I think no matter which way you think about it, the emerging pattern seems to
be rather clear. And it does help to learn the language, at least it does help
me.

I mean, previously I said that we have only two precedents of ?↔!, but now
looking at ?? !! I think it follows the same pattern. Note, however, that I am
not saying that ? should be replaceable by ! anywhere, which the first answer
here implied for some reason. I'm mainly just saying that there is pattern and
the lack of :?foo syntax is an exception rather than a rule. From this many
other benefits can be derived, if needed.

I hope this clarifies it a bit.

On 2017-07-22 20:11:35, lloyd.fo...@gmail.com wrote:
> 2¢:
> ? doesn't imply truth it implies a question. The ? prefix asks an
> expression whether it's True or False. When used as a sigil like
> $?FILE
> it's asking the compiler about something.
>
> ‘:foo’ sets foo to True. ‘:!foo’ sets it to False. ‘:?foo’ looks like
> it's
> trying to ask something a question, but I'm not sure about what.
>
> On Sun, Jul 23, 2017 at 12:41 PM Aleks-Daniel Jakimenko-Aleksejev via
> RT <
> perl6-bugs-follo...@perl.org> wrote:

Reply via email to