-
Notifications
You must be signed in to change notification settings - Fork 311
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
[Snake Island] How to write bindings for new targets #2779
Comments
@alfonsogarciacaro Import classes don't need to always be static, right? |
For Dart my main concern was about the methods and fields that exist outside classes, but you are right about being unable to represent the optional arguments if we went that way. Different |
@ncave No, they can have instance members as well, in that case, the generated code is very similar to the one for interfaces (no mangling, accessing the method directly from the instance) except for the constructor. |
This is a continuation of the discussion started here. Not sure about Rust, but because Python and Dart imports work in a similar way to JS, we can reuse the
Import
attributes from Fable.Core, with some differences. For reference, there's also a discussion about how to improve bindings for JS here.For Dart (I'm still learning the language so this may change) I'm considering to use static classes to represent external modules/packages. @Nhowka has suggested to just use modules, but this may be difficult for a couple of reasons:
However, it's true using classes makes it more difficult to declare types within the external modules. It's a bit clumsy and I still need to test it, but I think we can take advantage of F# ability to have a module and a class with the same name at the same level:
The text was updated successfully, but these errors were encountered: