Is It Time for the JavaScript Temporal API?
Anyone know why all new Ecmascript APIs are implemented to be used as &quot;newable classes&quot; rather than ordinary functions?<p>The community seems to be moving towards functional programming&#x2F;away from classes.. and pretty much every mainstream JS lib is function rather than class oriented (yes, I know classes are simply special functions)<p>Also adds unnecessary verbosity&#x2F;more syntax noise.<p>Is there some internal performance reason for why ordinary functions couldn&#x27;t be optimized to perform the same as &quot;new&quot;? (Seems like it would be easy to wire the prototype internally to the function, resulting in same semantics).<p>At this point better to be consistent, but I&#x27;d still use a date library just to avoid added verbosity of this native solution. Luxon API reads a lot better than this... Though I&#x27;m sure there are reasons a standard implementation needs added complexity (has to cover every edge case)