Andrew Ebling
03/31/2021, 8:54 AMsealed class
unsure if this is the most appropriate approach.Big Chungus
03/31/2021, 8:56 AMTomasz Krakowiak
03/31/2021, 9:04 AMTomasz Krakowiak
03/31/2021, 9:06 AMTomasz Krakowiak
03/31/2021, 9:08 AMTomasz Krakowiak
03/31/2021, 9:08 AMCLOVIS
03/31/2021, 10:01 AMRoukanken
03/31/2021, 10:10 AMX
, but could construct X
with 3 different ways - either own MyDate
class with 3 constructors or extension parser functions Date.parse(String): Date
& Date.parse(Int, Bool): Date
or it could be a function smth like setJsonAttribute(name: String, value: ???)
- there it could be discussed between multiple overloads or sealed class JsonValue
or maybe those union types
pretty sure I could think up more variants with different results... 😄Dmitry
03/31/2021, 10:36 AMAndrew Ebling
03/31/2021, 12:49 PM