dart-lang / core

This repository is home to core Dart packages.
https://pub.dev/publishers/dart.dev
BSD 3-Clause "New" or "Revised" License
15 stars 4 forks source link

Migrate the Result type to sealed classes #364

Open exaby73 opened 1 year ago

exaby73 commented 1 year ago

Since we have had Dart 3, we have access to sealed classes. I propose we migrate the Result class to sealed instead of abstract. I have done so in a fork. See the comparison. But since the minimum version had to be changed to >=3.0.0 <4.0.0, I'd like to first discuss this

lrhn commented 1 year ago

The entire package should be migrated to Dart 3.0. That would be one of the changes.

exaby73 commented 1 year ago

What would be the process for this? Maybe the min version would be updated first, then the migration of the code, or everything in one PR?

utamori commented 3 months ago

@exaby73 @kevmoo this package minimum sdk version has been updated, so I think the barrier to Sealed Class is gone!

kevmoo commented 3 months ago

you mean minimum SDK version?

utamori commented 1 month ago

This line was updated.

@exaby73 , do you want to create a PR? Shall I make one?

https://github.com/dart-lang/async/blob/c0d81f8699682d01d657a9bf827107d11904a247/pubspec.yaml#L7