Why do people complain about the number of string types and not about the number of number types? OTOH, when JS had one number type, people complained about that.
Numbers are hard™, so I made a very handy flow chart on picking a number type in @rustlang.
2
1
3
We all deal with multiple number types most of the time but rarely with multiple string types?
1
JavaScript has one (plus ArrayBuffers). Python has two. C++ has lots.
1
JavaScript has one sorta. Python has many (reduced somewhat in Python 3). (I didn’t mean different flavours of ints but natural numbers, integers, rationals etc. We all get training in the idea that there are many sorts of number.)
1
1
Off the top of my head, I counted 28 C++ string types in Gecko, so Rust is rather tame compared to that. :-)
1
1
Replying to @hsivonen @bparsia
Many of the Gecko string types should really just be extra constructors for what is currently their base class.

Sep 15, 2018 · 6:13 AM UTC

1
1
Replying to @davidbaron @bparsia
I didn't even count the NS_ConvertFOOtoBAR classes.
2
I wasn't counting them either. I'm saying things like nsDependentString should really just be constructors for nsString.
1