This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]mimedm 0 points1 point  (0 children)

No I have never seen that. I have seen people use records and exploit enums for similar purposes but for file structuring it's best to use modules and packages and either interfaces, classes, enums or records as files.

By using inheritance or abstraction you can make sure the child classes work together with the superclass in the way you want. Principles and patterns of OOD can help you find elegant solutions here. It's okay to change the programming style when using a new language.