Policy for exposing range structs
Anon via Digitalmars-d
digitalmars-d at puremagic.com
Thu Mar 31 09:38:59 PDT 2016
On Thursday, 31 March 2016 at 11:15:18 UTC, Johan Engelen wrote:
> Hi Anon,
> I've started implementing your idea. But perhaps you already
> have a beginning of an implementation? If so, please contact me
> :)
> https://github.com/JohanEngelen
>
> Thanks,
> Johan
No, I haven't started implemented things for that idea. The
experiments I did with it were by manually altering mangled names
in Vim.
I've been spending my D time thinking about potential changes to
how template string value parameters are encoded. My code is a
bit messy (and not integrated with the compiler at all), but I
use a bootstring technique (similar to Punycode[1]) to encode
Unicode text using only [a-zA-Z0-9_].
The results are always smaller than base16 and base64 encodings.
For plain ASCII text, the encoding tends to grow by a small
amount. For text containing larger UTF-8 code points, the
encoding usually ends up smaller than the raw UTF-8 string.
A couple examples of my encoder at work:
---
some_identifier
some_identifier_
/usr/include/d/std/stdio.d
usrincludedstdstdiod_jqacdhbd
Hello, World!
HelloWorld_0far4i
こんにちは世界 (UTF-8: 21 bytes)
XtdCDr5mL02g3rv (15 bytes)
---
I still need to clean up the encoder/decoder and iron out some
specifics on how this could fit into the mangling, but I should
have time to work on this some more later today/tomorrow.
[1]: https://en.wikipedia.org/wiki/Punycode
More information about the Digitalmars-d
mailing list