News for hackers. Stuff that matters.
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.
Re:Zig, Rust, and Other Languages by dleslie on Friday March 15, 2024 @10:46PM (#39722895)
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.

Re:Zig, Rust, and Other Languages by MBCook on Saturday March 16, 2024 @10:28AM (#39726254)
Well, I see I left the word “not” out which makes this a little more confusing. Oops.

It’s supposed to be “I have NOT seen”.