• Supercrunchy@programming.dev
    link
    fedilink
    English
    arrow-up
    4
    ·
    13 hours ago

    It might be nice to use in some very specific cases (e.g. addition-operation is a binary-operation AST node which is an AST node).

    In most of the cases it just creates noise though, and you can usually do something different anyway to implement the same feature. For example in rust, just use enums and list all the possible cases and it’s even nicer to use than inheritance.