Re:Zig, Rust, and Other Languages
by MBCook on Friday March 15, 2024 @10:26PM
(#39722787)
I’ve used Java my entire career. I have seen a custom string type nor a post advocating it in Java.
[ Parent
| on HN ]
Never seen one for C#, either.
Re:Zig, Rust, and Other Languages
by neonsunset on Saturday March 16, 2024 @06:39AM
(#39724724)
Apologies for the plug haha
https://github.com/U8String/U8String
With that said, implementing it is not easy, especially in terms of ensuring it is as fast as built-in string or faster (because the project goal is to be faster than built-in string and Go implementation, and match or outperform Rust's String where applicable).
I can't imagine something like that being possible in e.g. Java or most other high-level languages - they simply do not expose appropriate low-level primitives when you need a "proper" string type.