colfer icon indicating copy to clipboard operation
colfer copied to clipboard

Dart support

Open vendelin8 opened this issue 3 years ago â€ĸ 4 comments

Hi,

Awesome lib, thanks! I'm planning to add a dart implementation. Writing it here, so if anyone else thinks about to add it, we don't do it multiple times.

vendelin8 avatar Apr 12 '21 12:04 vendelin8

Cool! 😀

There are 3 milestones for adding a new language. First, we need a ./dart/gen.dart implementation with ./dart/gen_test.dart and friends. Once set, ./dart/gen.dart must be generated with a ./dart.go addition. At some point we do need a ./dart/bench too.

Each language uses the same structure for testing. The tests all use the same golden cases.

pascaldekloe avatar Apr 12 '21 15:04 pascaldekloe

Currently I'm working on the time part, and I'm not sure about it. Dart has a microsecond precision time format: https://api.dart.dev/stable/2.12.3/dart-core/DateTime-class.html For me it doesn't look necessary to add the missing 10bit information into a 64 bit dart int. Maybe with a cli flag to force add that field? What do you think?

vendelin8 avatar Apr 15 '21 18:04 vendelin8

Feel free to drop the precision. 🙂 No need for rounding either. We can always add a flag later for those who need the precision. It would be nice if you could mention the loss in the README.md table.

pascaldekloe avatar Apr 15 '21 23:04 pascaldekloe

Whoah, you pulled through @vendelin8. 😃 Not an easy task. Things look good too.

I'll try to familiarise somewhat with Dart a bit this weekend.

You seem to have some uncertainties/doubts, and Dart is completely new to me. Maybe we should release early (like this weekend) and advocate the API as experimental/unstable?

pascaldekloe avatar May 21 '21 13:05 pascaldekloe

Colfer will not support this language. ☚ī¸ My apologies @vendelin8.

pascaldekloe avatar Mar 29 '23 12:03 pascaldekloe