Home

Awesome

Kt2Dart

Build status

This is a transpiler which consumes Kotlin codes and convert them into Dart.

I made some CodeWars Katas inspired from this repo:

Why Kt2Dart

Because I want to Make Flutter Great Again.

Flutter, written in Dart, is an awesome mobile developing framework. But Dart is too weak, for the dynamic typing and null-unsafety.

Kotlin is much more powerful. If we can combine the beautiful flutter and the powerful/safe Kotlin, our world will be peaceful forever.

Also, since your dart codes are transpiled from Kotlin, you can use Sound Dart (the term Strong Dart refers to the same thing) compiler to compile the generated Dart codes.

You may find it better to use Kotlin's JavaScript mode (to enable the use of the dynamic type).

Limitations

Kt2Dart supports full-featured Kotlin (because I write this parser according to the strict grammar definition),

but I will not add any support for transpiling:

While these features are not fully supported:

Such (advanced) language features of Kotlin are too complex to transpile (it needs too much analyzing while Kt2Dart is just a simple tool).

And this tool will raise warnings as comments when these stuffs are detected.

Why Haskell

Yeah, as you see, I'm using Haskell in this project. Because Parser Combinators are easy and convenient I want to practise my Haskell skills.

I'm a beginner to Haskell, so if you find any naive code, feel free to tell me (by issuing or mailing) (I'm using hlint).