News for hackers. Stuff that matters.
Re:All JavaScript and TypeScript features of the last 3 year... by Izkata on Thursday March 09, 2023 @01:00PM (#35084377)
> - Tagged template strings. This just feels dirty to me. Probably won't use, but when I see it in a code base I won't be so confused at least

What's funny is the go-to example of using it for translations is just wrong: It only does numeric indexing, so can't be reliably used with languages where words would be in a different order. You still need a library or something that builds on top of it to handle that.

Re:All JavaScript and TypeScript features of the last 3 year... by edflsafoiewq on Thursday March 09, 2023 @02:15PM (#35085342)
Realistically changing word order isn't enough for translation either, you need a special language like ICU message syntax so you can handle grammatical number, gender, etc.