Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Maybe strip the maybe's.. I mean.. doesn't "property?: Type" already say "maybe" in a more concise way? I call semantic overload
And why Scalar['String'] and not just String? If everything is Maybe what use does TS even have except editor intellisense -
Well, it is close to being okay: undefined|T or null|T (decide on one and use it consistently) is how you define a Maybe<T> in TypeScript. And the question mark makes the presence of the property optional (which isn't the same as it having a value of undefined or null). Also i wouldn't allow optionals as values in sets and arrays.
And i think, i found the culprit: https://non-traditional.dev/the-pow... -
@Oktokolo I know but as an API consumer/ JS SDK user whether the prop is not on the response or undefined or null is functionally equivalent in the majority of cases (if (!res.prop)
-
@webketje Yes, but someone has to actually create that objects. And while it should also be functionally equivalent for them, it sadly isn't.
Enetrprise language design at its best. At least there is no SOAP involved in any way...
Related Rants
-
linuxxx32*client calls in* Me: good morning, how can I help you? Client: my ip is blocked, could you unblock it for m...
-
DRSDavidSoft28Found this in our codebase, apparently one of my co-workers had written this
-
linuxxx23*client calls* "hello, we forgot the password to our WiFi router. Could you reset that for us?" 😐😶😮...
Someone actually wrote this shit. Not once, not twice - it’s fucking everywhere.
rant
wtf