-
Notifications
You must be signed in to change notification settings - Fork 8
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
Various issues #429
Comments
Hey, thanks for taking the time to open the issue! The playground isn't 100% up to date currently, we'll need to bump it eventually. Real literals This is known, as we haven't decided how/if we want literal type inference. Since most our samples simply didn't rely on floating point numbers, we have postponed it until we decide on what we want to do with it. About the shorthand, it's because we didn't specify to allow it, as we didn't feel like saving one character was worth for a relatively more obscure literal notation: https://github.com/Draco-lang/Language-suggestions/blob/main/Specification/ExpressionsAndBuiltins.md#floating-point-literals Accessing constants The MSIL codegen backend probably has quite a few holes on it still, it's essentially driven by what subset of the BCL we are currently playing with. It's likely not too hard to implement, we just didn't bother. Chained member access on value types We didn't know about this, thanks. I'll try to look into it in a few days. Valuetypes were implemented in a hurry, so they probably require some patchwork all around. Overloaded operators That is actually outdated, we do look up operators in the participant operand types. The only problem is that it crashes for a similar reason as the chained member access, we'll have to patch this up. The fact that implicit casting isn't taken into account at all is more of a feature than a missing one (or bug), as we are trying to discourage implicit conversions as much as possible. We'll eventually add some way to interop with the operators ofc. Boolean logic Generally what you don't see in the specifications, you won't see implemented for expressions: https://github.com/Draco-lang/Language-suggestions/blob/main/Specification/ExpressionsAndBuiltins.md#operators-and-precedence There is no proposal yet, but a soft-suggestion from my end was to add intrinsic methods for these instead of operators. Flags enums This has not been implemented yet, in no small part because we don't even support bitwise or-ing. We have the most bare-bones enum support for now and read very little of the important attributes in the compiler for now (like the flags enum attrib). |
Hey, just letting you know that the crash fixes for the constants and chained member access have been fixed in #430 . The former was a simple matter of extending the CIL encoder for the remaining literal types. As for the latter, turns out we missed an important detail when decoding method signatures that come from generic contexts. Hopefully both should be fixed now with the PR. As for operator overloading, the error is actually misleading, it simply can't resolve a ctor with integer parameters (since we didn't deal with floating point types at all yet). Here's a sample session from our REPL showcasing operator overloading working: The rest are really "just" a matter of specifications. |
Not sure if the WebCompiler is up to date, but I found several issues with very basic language constructs:
Also, the grammar apparently doesn't allow shorting 0.x to just .x:
The compiler does not seem to care about
op_x
methods at all.The text was updated successfully, but these errors were encountered: