4 ms·
I thought I had a piece of dust on my screen, but as I scrolled the dust scrolled: what do these 0xB7 characters do in the identifiers? Are they just "name mang
by mdaniel 4y ago
I thought I had a piece of dust on my screen, but as I scrolled the dust scrolled: what do these 0xB7 characters do in the identifiers? Are they just "name mangling" to keep them from being exported or something?
https://github.com/ebitengine/purego/blob/v0.2.0-alpha/sys_darwin_amd64.s#L28-L29 https://github.com/ebitengine/purego/blob/v0.2.0-alpha/sys_d...
I noticed another 0xB7 character in a comment, and sure enough it seems to be part of the identifiers: https://github.com/ebitengine/purego/search?q=runtime%C2%B7cgocallback https://github.com/ebitengine/purego/search?q=runtime%C2%B7c...
- jchw 4y agoIt's name mangling yeah. I believe Go uses those characters in place of where it might use dots.
- totallygamerjet 4y ago"In Go object files and binaries, the full name of a symbol is the package path followed by a period and the symbol name: fmt.Printf or math/rand.Int. Because the assembler's parser treats period and slash as punctuation, those strings cannot be used directly as identifier names. Instead, the assembler allows the middle dot character U+00B7 and the division slash U+2215 in identifiers and rewrites them to plain period and slash."[0] [0] - https://go.dev/doc/asm https://go.dev/doc/asm
- saagarjha 4y agoThis is the most awful thing I’ve encountered all day.
- phanimahesh 4y agoThat's creative. I'm not sure if I should call it abuse, but I'm leaning heavily in favor.