{"action":"created","issue":{"url":"https://api.github.com/repos/Araq/Nim/issues/2811","labels_url":"https://api.github.com/repos/Araq/Nim/issues/2811/labels{/name}","comments_url":"https://api.github.com/repos/Araq/Nim/issues/2811/comments","events_url":"https://api.github.com/repos/Araq/Nim/issues/2811/events","html_url":"https://github.com/Araq/Nim/issues/2811","id":81008023,"number":2811,"title":"Unicode dashes as \"lisp'ish\" alternative to hump and snake notation","user":{"login":"ozra","id":563674,"avatar_url":"https://avatars.githubusercontent.com/u/563674?v=3","gravatar_id":"","url":"https://api.github.com/users/ozra","html_url":"https://github.com/ozra","followers_url":"https://api.github.com/users/ozra/followers","following_url":"https://api.github.com/users/ozra/following{/other_user}","gists_url":"https://api.github.com/users/ozra/gists{/gist_id}","starred_url":"https://api.github.com/users/ozra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ozra/subscriptions","organizations_url":"https://api.github.com/users/ozra/orgs","repos_url":"https://api.github.com/users/ozra/repos","events_url":"https://api.github.com/users/ozra/events{/privacy}","received_events_url":"https://api.github.com/users/ozra/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Araq/Nim/labels/RFC","name":"RFC","color":"1d1d1d"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":37,"created_at":"2015-05-26T15:16:08Z","updated_at":"2015-05-27T14:29:35Z","closed_at":null,"body":"I use `this-is-an-identifier` all the time in my code-bases (both in LiveScript for JS, and my home brew C++ transpiler). Seeing that Nim has such a magical feature to keep coders happy with `thisIsAnIdentifer` and `this_is_an_identifer` unification (world peace! At last!), it's a perfect candidate for introducing dash-delimiting.\r\n\r\nThe problem some have with it is the ambiguity regarding identifier-dash vs subtraction operator. For us who use it daily, that's a no-brainer - operators are always spaced. In Nim, this can be solved even better: a subtraction op is a subtraction op, the allowed dash in identifiers is instead a specific Unicode rune.\r\n\r\nI'm working on this right now, so I do hope it can be a accepted PR when I get it working. Otherwise I'll have to add a transpilation stage, or patch Nim all the time, *shudders*..\r\n\r\nThis would cater to lispers, cobolers (if they're not dead), livescripters, htmlers, cssers, url-sluggers, etc. (OK the list got a bit contrived at the end, I'll give you that!)\r\n\r\nPersonally I can't live with out it.\r\n\r\nI'd like some input on the rune to reserve for the purpose. The candidates so far are: `⋯` and `—`\r\n\r\n- both make it very clear they're not subtraction signs\r\n- both tie the identifier tightly together, even in non-spaced juxtaposition to subtraction op\r\n- both are available in all popular mono spaced fonts I've tried in the editor \r\n\r\nThe only downside is reserving one Unicode-rune to be 'magical' in identifiers like `_` and capitals, instead of verbatim, which I find perfectly reasonable. The way I see it, it's the only missing magic in the identifier-delimiter wars...\r\n\r\nThoughts?"},"comment":{"url":"https://api.github.com/repos/Araq/Nim/issues/comments/105931725","html_url":"https://github.com/Araq/Nim/issues/2811#issuecomment-105931725","issue_url":"https://api.github.com/repos/Araq/Nim/issues/2811","id":105931725,"user":{"login":"josephwecker","id":127894,"avatar_url":"https://avatars.githubusercontent.com/u/127894?v=3","gravatar_id":"","url":"https://api.github.com/users/josephwecker","html_url":"https://github.com/josephwecker","followers_url":"https://api.github.com/users/josephwecker/followers","following_url":"https://api.github.com/users/josephwecker/following{/other_user}","gists_url":"https://api.github.com/users/josephwecker/gists{/gist_id}","starred_url":"https://api.github.com/users/josephwecker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josephwecker/subscriptions","organizations_url":"https://api.github.com/users/josephwecker/orgs","repos_url":"https://api.github.com/users/josephwecker/repos","events_url":"https://api.github.com/users/josephwecker/events{/privacy}","received_events_url":"https://api.github.com/users/josephwecker/received_events","type":"User","site_admin":false},"created_at":"2015-05-27T14:29:35Z","updated_at":"2015-05-27T14:29:35Z","body":"That one I didn't have locally so I typed it in [on their site](http://font.ubuntu.com/). It may have been a glyph they added recently. In fact, my version of Inconsolata may be pretty old too. Most typefaces are constantly adding new unicode glyphs. I forgot about source code pro. Visually U+2011 looks better in most fonts, IMO.\r\n\r\nLike I said earlier though, in most OS'es there are ways to indicate a \"backup-font\" when a glyph is missing (haven't looked it up in a long time but remember it exists)- so there are workarounds so you can use the \"correct\" one without infecting Nim with a decision that is only relevant due to the state of fonts in May of 2015 ;-)"}}