2/13/2024 0 Comments Rust item store not working![]() The cost is that now you have two or three different string representations floating around. These all have the same asymptotic performance characteristics, but allow ASCII strings (which are extremely common) to be stored with less memory. The problem with the “array of code points” idea is that you end up with the most general implementation, which is a UTF-32 string, and then you end up with the fastest implementation, which is a UTF-8 string, and maybe throw in UCS-2 for good measure. I think the main alternative design is to treat strings like in Rust or Go. And you probably won't have any reason to finish it. So basically I agree that plowing through all the details - and really observing their consequences in real programs - is more important and time-consuming than grand ideas.īut if you lack any grand ideas, then the language will probably turn out poorly too. Looks like almost every language had problems with for loops and closures, including C# and Go. And a bunch of mistakes with syntactic consistency, apparently. And also most people argue that objects vs. ![]() OCaml seems to have gotten mutable strings wrong (for some time), and also I think the split between regular sum types and GADTs is awkward. See fish shell discussion about wchar_t on the front page now also see Guile Scheme) (Array of code points isn't generally useful, and it's hard to implement efficiently. Python did better, but I strongly argue both Python 3 and Python 2 got strings wrong. Turns out there's an avalanche of details, and they interact in many ways! with Perl, one definition of "wrong" is that Perl 6 / Raku didn't make the same design choice) I always wondered why JS and PHP and Perl got so many details "wrong" (e.g. I hadn't heard this last one before, but it's SO right. Language design is a curious mixture of grand ideas and fiddly details
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |