shamblett / cbor

A CBOR implementation for Dart
MIT License
36 stars 15 forks source link

Makes most constructors non-const #39

Closed nicbn closed 2 years ago

nicbn commented 2 years ago

For future proofing, most constructors were made non-const.

This is a breaking change that should be done before release 5.0.0, so later changes such as adding mutable fields can be done.

This shouldn't matter much for the end-user as these classes are likely to be created on the fly.

The only constructors I've left as const are for float, int and simple values, as their implementation is straightforward and unlikely to change much in the future and the user is more likely to want to create const instances of values such as CborNull or CborSmallInt(0).