PurpleKingdomGames / tyrian

Elm-inspired Scala UI library.
https://tyrian.indigoengine.io/
MIT License
346 stars 26 forks source link

Consider: Rename `TyrianApp` to `TyrianIOApp` and `TyrianZIOApp` #243

Closed davesmith00000 closed 8 months ago

davesmith00000 commented 8 months ago

It caused someone some confusion recently, and it was suggested that it was odd having two separate modules that define the same class with different behaviours.

armanbilge commented 8 months ago

It's not just odd, it's bad practice: if someone adds both artifacts as dependencies by mistake (as this user did), then it means that they will have two very different versions of the same class on the same classpath. This situation is resolved non-determinstically and confuses the compiler and the human.

davesmith00000 commented 8 months ago

Yes, I think I'd fallen into the "no-one would add both, surely, I mean why would they?" trap of assuming people won't try absolutely every possibility.

I've done similar things before to allow you to essentially swap libraries because they conform to the same interface (maybe that was also a mistake, but it worked), but I think this is different as they actually don't conform.

I may yet try getting rid of both and just force people to supply the details themselves. It's not like it's a lot of code. We'll see what side of bed I fall out of in the next few days when I sort this out. :stuck_out_tongue_closed_eyes: