4 ms·
> iso.add(Shape.Prism(new Point(0, 0, 0))); How come the constructor for Point uses new, but the constructors for shapes are just called as regular func
by eurleif 13y ago
> iso.add(Shape.Prism(new Point(0, 0, 0)));
How come the constructor for Point uses new, but the constructors for shapes are just called as regular functions?
- prezjordan 13y agoYou can actually leave out new for Points, and Shape.Prism just returns a new Shape. Prism itself is not actually an object (or constructor for an object), it's just a function. It could use a little consistency :)