Jacob Rhoda
09/21/2023, 7:53 PMkotlin.Unit to disambiguate?Chris Fillmore
09/21/2023, 11:58 PMUnit?Chris Fillmore
09/21/2023, 11:58 PMJacob Rhoda
09/22/2023, 12:51 PMChris Fillmore
09/22/2023, 12:55 PMMeasurementUnit, so there is no collision with kotlin.Unit. You’re all goodJacob Rhoda
09/22/2023, 12:55 PMUnit , which is why I asked my question.Chris Fillmore
09/22/2023, 12:56 PMbod
09/22/2023, 12:57 PMChris Fillmore
09/22/2023, 12:57 PMResult type, for example, which collides with kotlin.ResultChris Fillmore
09/22/2023, 12:58 PMJacob Rhoda
09/22/2023, 1:05 PMCLOVIS
09/22/2023, 1:09 PMSometimes there’s a convention, like prepending with a letter, or using some language feature to disambiguate.There is: it's package names and import aliases. But those are the user's responsibility, so if it's a type you use a lot, it's probably worth having a different name to avoid the hassle
bod
09/22/2023, 1:10 PMUnit with an import alias, you might as well do it for them 🙂Chris Fillmore
09/22/2023, 1:10 PMkotlin.Result by accidentStarr
10/01/2023, 4:55 PMSIUnit used for this problemspaceJacob Rhoda
10/02/2023, 4:03 PMSIUnit, however it would also represent non-SI units…Jonathan Olsson
11/29/2023, 6:41 AMUnitDefinition, UnitModel, UnitBase seems perhaps like decent alternatives as well in addition to MeasurementUnit.