4 ms·
Less options for mixing latitude and longitude? I personally like static methods. Point point = Point.fromLonLat(55.25…, 25.20…); The builder pattern is usef
by iampims 4y ago
Less options for mixing latitude and longitude?
I personally like static methods.
Point point = Point.fromLonLat(55.25…, 25.20…);
The builder pattern is useful to set defaults and add features without breaking backward compatibility.
- nonethewiser 4y ago> The builder pattern is useful to set defaults and add features without breaking backward compatibility. Ah, that is interesting. Did not think about that.
- oh_sigh 4y agoYou can also have cached static instances(assuming immutability), eg Point.fromLonLat(0,0) can always return the same instance, whereas new Point(0,0) must allocate and return a new instance.