ClojureDart icon indicating copy to clipboard operation
ClojureDart copied to clipboard

static methods on interfaces backing protocols

Open cgrand opened this issue 1 year ago • 0 comments

This affects both produced code and consumption from Dart.

As part of the abstract class backing a protocol we could have static methods to invoke the protocol. This would help invoking protocols from Dart.

Plus these static methods could be marked @pragma("vm:prefer-inline"), which would also simplified emitted code as emitted code could rely on them (in case of a method with multiple arities we may have one static method per arity for CLJD usage and one static method with optionals for Dart usage) in emitted code.

Relying on them in emitted code would have benefits in code size and legibility.

cgrand avatar Feb 12 '24 08:02 cgrand