Toot

Written by Russell on 2025-02-01 at 21:24

@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

Mentions

=> View nyamsprod@phpc.social profile

Tags

Proxy Information
Original URL
gemini://mastogem.picasoft.net/toot/113930736838880547
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
263.79652 milliseconds
Gemini-to-HTML Time
0.962786 milliseconds

This content has been proxied by September (3851b).