Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This was also my first thought, in perhaps more confused language than snarky, though.


Um, "snarky"? How do I ask "is this last element optional, and does it have to be an emoji?" without snark? And it's the most egregious (in the "glaring" sense, not "outlandishly awful") things about the example, you don't often see emojis being a part config/programming languages outside of embedded strings, everything else is pretty self-explanatory dialect of YAML.

The use of emojis looks quite similar to the way parameter/argument labels are introduced in Swift: in the function signature, you use two names (separated by a space) before the colon, instead of one. So, is this second part a shorthand alternative name, or just a visual comment, or?..

    ENTITY_DECLARATION  ::=  NAME [SPACE COMMENT] COLON ...

    ENTITY_DECLARATION  ::=  NAME [SPACE SINGLE_EMOJI_COMMENT] COLON ...

    ENTITY_DECLARATION  ::=  NAME1 [SPACE NAME2] COLON ...

    ENTITY_DECLARATION  ::=  REGULAR_NAME [SPACE EMOJI_NAME] COLON ...
What is it?

Don't get me wrong, I am not opposed to emojis on principle, they are just 1) a tad too outstanding in the text for my taste, 2) a tad too difficult to enter unless you're on a mobile keyboard, 3) I personally would rather not edit program source code/configs on mobile.


> 2) a tad too difficult to enter unless you're on a mobile keyboard

Windows and macOS both have great on-screen keyboards (OSK)/input method editor (IME) for emoji. Many (most?) Linux desktop environments also provide one. On Windows it is Win+. or Win+; and on macOS it is Ctrl+Cmd+Space and on Gnome it is Ctrl+Shift+E,Space or Super+E.


NixOS, GNOME 47, Firefox, Ctrl+Shift+E opens devtools, Super+E does nothing. I have a flatpak app called "Smile" for entering emojis which always starts up very slowly - faster to open some webchat client and copy from its emoji picker...


fn + E also works on macOS.


> SINGLE_EMOJI_COMMENT

Bwahahaha. Sorry, I’ve just imagined the poor sod who has to implement this grammar and has to decide whether presentation selectors or (potentially unknown) ZWJ sequences or (potentially unknown) letter-pairs denoting flags count parts of as single emoji (in theory they do[1], but good luck figuring out what tables you need).

> the way parameter/argument labels are introduced in Swift: in the function signature, you use two names (separated by a space) before the colon, instead of one

Side note: Swift’s style likely comes from Objective-C, which in turn comes from Smalltalk.

[1] https://www.unicode.org/reports/tr51/


Yeah, I also have stopped for a second to consider what "SINGLE" should mean here but then realized I was thinking about Unicode grapheme clusters, and emoji sequences, and I should probably not do that before the dinner (or ever, really).




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: