@nyamsprod I've never been a fan of static constructor methods for any reason. Like that's the entire purpose of __construct
and circumventing it feels ... off. Plus it's more often used to hide or enable singleton state that gives it an odor.
There's the argument about validating the shape/type/value or having convenience conversion methods (e.g. Vec2::from(Vec3)
) but that friction should be an indicator of doing something wrong. Like it should be the Vec3 owns that logic.
¯_(ツ)_/¯ 2¢
=> More informations about this toot | View the thread | More toots from zimzat@mastodon.social
=> View nyamsprod@phpc.social profile
text/gemini
This content has been proxied by September (3851b).