Re:Lost in Translation: The Bug That Spoke Russian and Crash...
by moi2388 on Tuesday May 07, 2024 @02:28AM
(#40282946)
This is always the issue. It’s why Python and JavaScript are so terrible, and the cause of so many bugs, yet so readily available in apis and cicd pipelines.
Why people insist on keep using strings instead of typesafe variants is beyond me
Re:Lost in Translation: The Bug That Spoke Russian and Crash...
by ficklepickle on Wednesday May 08, 2024 @11:18PM
(#40304994)
TypeScript is nice here because you can specify the specific strings you accept in a union. Eg. `unit: 'AC'|'DC'`
See, I am not an Android developer either. I could have made the same mistake. To me it comes down to — why string types?