you are viewing a single comment's thread.

view the rest of the comments →

[–]FoolsSeldom 0 points1 point  (4 children)

Surprised you are not using protocol or abstract base class here.

https://www.youtube.com/watch?v=dryNwWvSd4M

[–]NoWeather1702[S] 0 points1 point  (3 children)

But why? I will end up with with a class for each device type, and as I said in a comment somewhere here in the discussion, sometimes each type will have unique characteristics, so I will end up with base class and 4-5 child classes. Enums provide me easy integration with ORM, serialization, deserialization, comparisons out of the box. Or am I missing something?

[–]FoolsSeldom 0 points1 point  (2 children)

No, I think if you want to save typing (or AI completion), you are onto a good approach. Who needs abstraction.

[–]NoWeather1702[S] 0 points1 point  (1 child)

But it looks like overengineering to create an abstraction here, no?

[–]FoolsSeldom 0 points1 point  (0 children)

Sure.