💯% accurate. funny how the typescript developer thinks this is some kind of “gotcha!”… like maybe just try a language besides typescript and find out for yourself 😆
I’m not sure if you’re being rhetorical or not, but “string|number” is definitely correct here. A computer could definitely figure this out, but typing is for the benefit of the coders more than the code itself. It’s basically functional documentation
Yeah that’s what I’m saying, I hate it when coworkers will assign everything as “any” just to avoid the scary red squigglies. Oh well I guess that’s what code reviews are for 🙃
deleted by creator
Type error unless there’s an implementation of
+
that specifies adding together and integer and a string.💯% accurate. funny how the typescript developer thinks this is some kind of “gotcha!”… like maybe just try a language besides typescript and find out for yourself 😆
deleted by creator
“brought” 😏
my complaint is that typescript is stupid, yes. so why wouldn’t i compare to what other languages do that is less stupid?
on the plus side, at least now i know that the ad-hominem minded devs came here too, and brought their righteousness with them.
deleted by creator
OCaml 😍
In the world of C and pointer arithmetic this makes perfect sense /s
I’m not sure if you’re being rhetorical or not, but “string|number” is definitely correct here. A computer could definitely figure this out, but typing is for the benefit of the coders more than the code itself. It’s basically functional documentation
deleted by creator
Yeah that’s what I’m saying, I hate it when coworkers will assign everything as “any” just to avoid the scary red squigglies. Oh well I guess that’s what code reviews are for 🙃