4 ms·
> I don't need tests to check what methods or fields are on my types though. You do though, because invariably people violate the LSP and just "throw Unimpleme
by jacobsenscott 4y ago
> I don't need tests to check what methods or fields are on my types though.
You do though, because invariably people violate the LSP and just "throw Unimplemented" in the methods required by the interface they can't figure out how to implement. In other words all system are duck typed in reality.
- lijogdfljk 4y agoI don't, though. If it compiles, it exists. Saying that a method might actually be a nuke is a bit besides the point. It could also contain a virus. Not sure what typing system you're referring to, but it sounds very half-baked at best. I'm using Rust fwiw. I cannot access any field or method that does not exist. Even dynamic traits are compile time enforced, but i think we can largely have this discussion around static dispatch.