Hi @sindresorhus . First of all I think your design of LaunchAtLogin is great!
But I'm just curious why is it implemented as enum?
My impression was that enums should be used to define a common type for a group of related values (case items). I occasionally keep seeing enum being used as much more, like in your example.
I was just wondering what is the benefit? Were there any limitations to implementing logic via class or struct approach?
I have a feel that using enums in the way you did is kind of abusing enums. But it may be well since I come from the Java world originally. Or if you can point to some article were it is justified or encouraged to use enums the way you did.
Note: I'm aware this question is not an Issue in classical sence, I was just curious in the discussion.
Hi @sindresorhus . First of all I think your design of LaunchAtLogin is great!
But I'm just curious why is it implemented as enum?
My impression was that enums should be used to define a common type for a group of related values (case items). I occasionally keep seeing enum being used as much more, like in your example.
I was just wondering what is the benefit? Were there any limitations to implementing logic via class or struct approach?
I have a feel that using enums in the way you did is kind of abusing enums. But it may be well since I come from the Java world originally. Or if you can point to some article were it is justified or encouraged to use enums the way you did.
Note: I'm aware this question is not an Issue in classical sence, I was just curious in the discussion.
Thank you.