-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
False domain error reported when name of expected verb instead refers to a noun #207
Comments
Agreed that domain error is misleading. 'value error'means undefined name.
This is a /pun in type/, where JE analyzed a phrase using the parts of
speech of the defined names, and later, when the result of the analysis was
to be used, a name had a different type. Worth a better message, I agree.
Henry Rich
…On Sat, Aug 17, 2024, 11:52 PM Cameron Chandoke ***@***.***> wrote:
f=: N+]
N=: 3
f 1
|domain error in N, executing monad N
| f 1
Because N wasn't defined at the time that f was, it was assumed to be a
verb. When the execution of [N as a verb], an error was raised because it
instead referred to a noun.
This is reported as a domain error, which it is confusing; it should be
interpreted as a value error since it concerns N's part-of-speech only. It
might say e.g.
|value error in N, executing monad N: N was expected to be a verb, but is defined as a noun
| f 1
Perhaps better would be to instead attempt to interpret N as a noun and
apply the containing expression accordingly, upon the interpreter seeing
that N is a noun (or just as a general fallback to attempted verb
interpretations). This latter suggestion might not be feasible, depending
on implementation details.
—
Reply to this email directly, view it on GitHub
<#207>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEKVAJ62ZGTB3FZGPQYJP4LZR7HZRAVCNFSM6AAAAABMVZBGVWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ3TCNRZHEZTOMI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
New message coming in next beta
Henry Rich
…On Sun, Aug 18, 2024, 7:44 AM Henry Rich ***@***.***> wrote:
Agreed that domain error is misleading. 'value error'means undefined name.
This is a /pun in type/, where JE analyzed a phrase using the parts of
speech of the defined names, and later, when the result of the analysis was
to be used, a name had a different type. Worth a better message, I agree.
Henry Rich
On Sat, Aug 17, 2024, 11:52 PM Cameron Chandoke ***@***.***>
wrote:
> f=: N+]
> N=: 3
> f 1
> |domain error in N, executing monad N
> | f 1
>
> Because N wasn't defined at the time that f was, it was assumed to be a
> verb. When the execution of [N as a verb], an error was raised because
> it instead referred to a noun.
>
> This is reported as a domain error, which it is confusing; it should be
> interpreted as a value error since it concerns N's part-of-speech only. It
> might say e.g.
>
> |value error in N, executing monad N: N was expected to be a verb, but is defined as a noun
> | f 1
>
> Perhaps better would be to instead attempt to interpret N as a noun and
> apply the containing expression accordingly, upon the interpreter seeing
> that N is a noun (or just as a general fallback to attempted verb
> interpretations). This latter suggestion might not be feasible, depending
> on implementation details.
>
> —
> Reply to this email directly, view it on GitHub
> <#207>, or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AEKVAJ62ZGTB3FZGPQYJP4LZR7HZRAVCNFSM6AAAAABMVZBGVWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ3TCNRZHEZTOMI>
> .
> You are receiving this because you are subscribed to this thread.Message
> ID: ***@***.***>
>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Because
N
wasn't defined at the time thatf
was, it was assumed to be a verb. When the execution of [N
as a verb] was attempted, an error was raised because it instead referred to a noun.This is reported as a domain error, which it is confusing; it should be interpreted as a value error since it concerns N's part-of-speech only. It might say e.g.
Perhaps better would be to instead attempt to interpret
N
as a noun and apply the containing expression accordingly, upon the interpreter seeing that N is a noun (or just as a general fallback to attempted verb interpretations). This latter suggestion might not be feasible, depending on implementation details.The text was updated successfully, but these errors were encountered: