3 ms·
In Java, there seems to be an interface for every concept and the way they are used is quite restrictive in a harmful way. For example, a URL isn't merely a str
by jongjong 4y ago
In Java, there seems to be an interface for every concept and the way they are used is quite restrictive in a harmful way. For example, a URL isn't merely a string which is copied/cloned (by value) each time it gets passed to a new function, there is an actual URL instance and you are encouraged to pass around references of it. This type of design can cause issues if multiple modules end up holding a reference to the same instance and try to modify it (in conflicting ways). It just encourages poor design IMO. It requires more effort (more friction) to avoid bad, tightly coupled architecture.