pcouy@lemmy.pierre-couy.fr to Programming@programming.dev · 10 days agoCode Smells Catalogluzkan.github.ioexternal-linkmessage-square51fedilinkarrow-up11arrow-down10
arrow-up11arrow-down1external-linkCode Smells Catalogluzkan.github.iopcouy@lemmy.pierre-couy.fr to Programming@programming.dev · 10 days agomessage-square51fedilink
minus-squareStrikeForceZero@programming.devlinkfedilinkarrow-up0·edit-28 days agoYeah Interfaces would be the next best thing. The only reason why traits are considered better is because in languages like rust it can enable static dispatch. Whereas interfaces in C#, Java, Typescript, (and C++ via abstract classes, not templates) are always dynamic dispatch.
Yeah Interfaces would be the next best thing.
The only reason why traits are considered better is because in languages like rust it can enable static dispatch. Whereas interfaces in C#, Java, Typescript, (and C++ via abstract classes, not templates) are always dynamic dispatch.