2 ms·
If it's not an interface, then it is probably correct to crash when called incorrectly. Problems should be found early on. If it is an interface, you may nee
by projektfu 8y ago
If it's not an interface, then it is probably correct to crash when called incorrectly. Problems should be found early on. If it is an interface, you may need special processing. A clear way of doing this is to do the sanity checking in the interface method and then pass to a module-private method that does the work. Internal logic that calls the same method can bypass the sanity check.