| 11 Dec 2025 |
Qyriad | identifiers still cant *start* with a number | 20:19:44 |
Qyriad | gods no | 20:19:48 |
piegames | inb4 packages.1Password :D | 20:20:01 |
Qyriad | hmmm | 20:20:35 |
KFears (burnt out) | In reply to @hexa:lossy.network Per Twitter conversation, no. Oh, sigh. I hoped it would be a troll. Well, nope, of course it would be our favorite fascist once again showing his disrespect | 20:20:37 |
aloisw | In reply to @qyriad:katesiria.org oh, no simply ban that too What is the additional bias towards treating things as an identifier then? a-1 being one is already how it works today. (I think banning 1-1 is mostly fine though.) | 20:21:57 |
aloisw | In reply to @piegames:flausch.social inb4 packages.1Password :D packages.r"password" | 20:22:25 |
aloisw | ~~packages.\u0031password~~ | 20:24:07 |
piegames | Honestly, why not ban identifiers that end with -[number] while keeping alphanumerics after dashes? | 20:24:19 |
raitobezarius | In reply to @aloisw:julia0815.de NO My reaction while reading these last messages | 20:24:29 |
piegames | That would remove the most confusing case | 20:24:37 |
Qyriad | In reply to @piegames:flausch.social Honestly, why not ban identifiers that end with -[number] while keeping alphanumerics after dashes? agreed | 20:24:43 |
piegames | Do we think this is a footgun big enough to warrant a depraction as of now, or will this wait for langver? | 20:25:18 |
KFears (burnt out) | In reply to @qyriad:katesiria.org imo Nixlang2: we simply always require spaces around subtraction I very recently learned about https://gren-lang.org/ , which seems to do a lot of things right in a similar-ish direction | 20:25:47 |
aloisw | * packages.r"1password" | 20:25:49 |
aloisw | In reply to @aloisw:julia0815.de packages.r"1password" Yeah maybe not, r"" would be nice for regexes. | 20:30:23 |
Charles | maybe v"" for variable | 20:30:52 |
Charles | or i"" for ident | 20:30:58 |
KFears (burnt out) | Double quotes regular strings and singular quotes for verbatim strings | 20:32:24 |
aloisw | Or copy Rust's r# prefix fully. Although that's weird with whitespace again. | 20:32:33 |
piegames | In reply to @aloisw:julia0815.de packages.r"1password" Why the r" though? Because strings as identifiers literally already work today | 20:54:16 |
piegames | I think y'all are confusing "raw identifiers" with "raw strings" | 20:54:45 |
Charles | i don't think they do:
nix-repl> "1" = 2
Added "1".
nix-repl> "1"
"1"
| 21:04:59 |
Charles | you need some syntax to "dereference" a string as if it were a variable | 21:05:43 |
Charles | you can work around the lack of this today with this suggestion though | 21:06:09 |
Charles | like this | 21:06:17 |
Charles | e.g. imagine being able to do this instead of the workaround:
nix-repl> "1" = 2
Added "1".
nix-repl> i"1"
2
| 21:08:48 |
helle (just a stray cat girl) | the rules for how strings vs substraction works does need to be easy to teach, so not too much heuristic pleaaaaase | 21:09:39 |
helle (just a stray cat girl) | we wouldgo off on a massive UX and teaching this sort of stuff rant if we weren't feeling nauseous | 21:10:10 |
Charles | if i were designing a language from scratch and i wanted support for more or less arbitrary identifiers, i would have two kinds of identifiers:
- literal identifiers, like
foo, foo_bar, _foo123, etc; XID_Start followed by >=0 XID_Continue
- string identifiers, like
i"..." to use an arbitrary string of characters and escape sequences to construct an identifier
| 21:13:16 |