Fable
Fable copied to clipboard
[Dart] Feature tracking
Feature tracking issue for Dart language support:
(see #2703 for Rust)
- [x] Dart AST
- [x] Dart AST Printer
- [ ]
Fable2Dart:- [x] modules
- [x] primitives
- [x] bool
- [x] char
- [x] string
- [x] integers
- [x] floats
- [x] control flow
- [x] tail call optimization
- [x] functions
- [x] lambdas
- [x] custom operators
- [x] records
- [x] anonymous records (compiled as tuples for now)
- [x] unions
- [x] tuples
- [x] arrays
- [x] lists
- [x] sequences
- [x] options
- [x] results
- [x] choices
- [x] refcells, byrefs
- [x] enums (compiled as ints)
- [x] classes
- [ ] structs
- [ ] object expressions
- [x] interfaces (most)
- [x] imports
- [x] comparers (some)
- [ ] conversions
- [ ] formatting
- [x] string interpolation
- [ ] exceptions
- [ ] reflection
- [ ] async
- [ ] threading
- [ ]
fable-library-dart- [x] Array
- [x] ResizeArray
- [x] List
- [x] Seq
- [x] Option
- [x] Range (some)
- [x] Result
- [x] Choice
- [x] Map
- [x] Set
- [x] Dictionary (replacements, native Map)
- [x] HashSet (replacements, native Set)
- [x] String (except formatting)
- [ ] Char
- [x] RegExp
- [ ] Decimal
- [ ] BigInt
- [ ] Guid
- [x] DateTime
- [ ] DateTimeOffset
- [x] TimeSpan (compiled as Dart Duration)
- [ ] Timer
- [ ] Event
- [ ] Observable
- [ ] other FSharp.Core modules
- [ ] other .NET BCL implementations
@dbrattli You may want to create a similar issue to track Python progress. This way users can easily see what's currently supported as we started publishing alpha releases of Snake Island. I also created a project here but maybe for now this kind of issue trackers are more convenient. We can go back to the project when users start reporting issues 👍
@alfonsogarciacaro Fixed a typo.
Howdy! Cool project! Is this still being actively developed?
@phrmoy I haven't used the dart target, but I think we are at a stage where it is for people to use it and report what is missing for their use cases, or making their life difficult with the target.
Missing pieces in the list above don't preclude leveraging what is already shipping, AFAIU.
Indeed, the project is in Beta
Users are encourage to try it out to help with development and give feedback
I didn't write the documentation for this target, because I don't know Dart and didn't have the time to learn it at the time. If someone want to steps in to help on it it would be of great help.
Doing the documentation, also allows to raise strange behaviour like I did for Python. And can help, improving the consistency and stability of the target when maintainers steps in to fix them :)
How does async not being ready really work? will async code just be sync, will it not work at all or something totally different?
From what I see it's not compiling, it expects AsyncBuilder to be generated inside fable_modules but AsyncBuilder doesn't exist?
Can I make it work somehow? Making it synchronous works too I just want to be able to do async/await and call it both ways, F# -> Dart and Dart -> F#.
@marenovakovic In order to have async working, src/fable-library-dart/Async.dart and src/fable-library-dart/AsyncBuilder.dart needs to be implemented.
We currently don't have an active maintainer for the dart target. It believe i was mostly done by Alfonso at the time.
If someone with Dart knowledge want to give it a try, we will welcome the PR and try to help where we can. Looking at how others target like JavaScript, Python or Rust implements would be a good starting point.
I see. Thank you. I'll take a look at it soon and maybe even create MR, who knows 😀