-
Notifications
You must be signed in to change notification settings - Fork 158
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
usability: int
should default to i32
#1926
Comments
notice |
I am not quite sure. But indeed the default integer should just be i32, no matter where it is used. |
lpython/src/lpython/semantics/python_intrinsic_eval.h Lines 48 to 63 in 8838e52
Currently we support |
In this issue, do we wish to support type alias |
I think we need to support the following type
Or we can also implement this as #1199 |
CPython doesn't have double, and
So maybe for now we can give a nice error message for This is also related to currently having to explicitly cast all integers and floats to be the same type for arithmetic operations and for assignments. We switched to this more strict approach which made things clear what type everything is, and it discovered bugs in our test suite, showing that it's easy to make a mistake if not casting things explicitly. But once we have more experience using LPython as a programming language, we can relax things in various ways. And if we do, it might also influence how we decide about what |
Right now let's do:
|
Can I work on this issue?? |
I have explicitly changed the error message for 'int' to :
|
Just submit a PR, no need to ask for a permission. |
fixes semantic error for int (Issue #1926)
The following compiles:
but, for usability, it should be
The text was updated successfully, but these errors were encountered: