perlang-org / perlang

The Perlang Programming Language (GitHub Mirror)
https://gitlab.perlang.org/perlang/perlang
MIT License
16 stars 1 forks source link

(stdlib) Implement native `ASCIIString` and `UTF8String` classes #451

Closed perlun closed 6 months ago

perlun commented 6 months ago

"Native" as in "C++", being possible to access from C++ code targetting native machines.

perlun commented 6 months ago

Hmm, and should it be AsciiString or ASCIIString? We should at least be consistent (the other one is named UTF8String now :rofl:).

perlun commented 6 months ago

Hmm, and should it be AsciiString or ASCIIString? We should at least be consistent (the other one is named UTF8String now 🤣).

https://github.com/perlang-org/perlang/issues/370 has it as AsciiString and Utf8String, in fact. I'm not 100% certain about this.. but let's go with that for starters. Will rename UTF8String now.

(The other option would be to go the Golang route, and prefer that initialisms should be written in "consistent case", https://go.dev/wiki/CodeReviewComments#initialisms. I.e. ASCIIString and UTF8String. I'm probably a bit influenced by having read a bit of C# code in my days (and currently back to working with in my day-time job), but I kind of thing that AsciiString is somewhat kinder to the reader than ASCIIString. Yes, going with .NET-style for now, despite the "bad" part about in "changing case of existing acronyms".)

perlun commented 6 months ago

Then again, UTF8String is kind of better than Utf8String.. :see_no_evil: Either way we put it.. we'll end up somewhat miserable. :neutral_face: Will pick one style now to just try to get this merged.