Skip to content
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

type checking #122

Open
lhommev opened this issue Jun 6, 2023 · 1 comment
Open

type checking #122

lhommev opened this issue Jun 6, 2023 · 1 comment
Assignees
Labels

Comments

@lhommev
Copy link

lhommev commented Jun 6, 2023

Hi,
I'm using this library and I am very pleased with the capabilities and performance.
With vey large data to process, i see ~400K evaluations per seconds with 12 cores CPUs.

Anyway, i noticed that there is no exception thrown when doing this:

123 == "abc"

I would expect an error with this expression. Does this make sense to you ?

@beltoforion beltoforion self-assigned this Jun 6, 2023
@beltoforion beltoforion added the bug label Jun 6, 2023
@beltoforion
Copy link
Owner

beltoforion commented Jun 6, 2023

This is a bug. It should be false based on the type alone. I'm not even sure whats happening here that the result is true.

On closer inspection i think it is correct to just return false. At first i was under the assumption the return value is "true". In my mind throwing an exception should only be done if the expression is incorrect. In this case i would go with what JavaScript does.

@beltoforion beltoforion added Wont fix and removed bug labels Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants