4 ms·
I wish a language was designed to allow identifier with space in them without quotes. That is the most readable. But I don’t know the consequences to the rest o
by pyrolistical 4y ago
I wish a language was designed to allow identifier with space in them without quotes. That is the most readable. But I don’t know the consequences to the rest of the grammar
- jfk13 4y agoTry Algol68.
- thaumasiotes 4y agoUnderscores are visually very similar to spaces. Their major problem is unrelated to their appearance - it's that you have to use a key combination in order to type them on a standard keyboard. The obvious solution would appear to be to use better keyboards, but I don't even see anyone suggesting that. But note that the lisp identifier style, words-separated-by-hyphens, is better than using underscores despite being less legible. It's purely a matter of how easy it is to type the separator. ("Standard" languages don't allow hyphens in identifier names because they want to allow subtraction without requiring a space between the subtraction operator - and the two operands. In Lisp, spacing around an operator, including the subtraction operator, is required. You could go a long way in a C-like language by just requiring spacing around operators and immediately being able to allow hyphens in identifiers.)
- downvotetruth 4y ago> Their major problem is unrelated to their appearance Shift key is a problem for all the shifted only chars. Their major problem is appearance: a single underscore '_' vs underscores '__' . Concatenated glyphs are hard to discern due to only distinguisher being width.
- thaumasiotes 4y agoI have no idea what you're trying to say. You just compared underscores with underscores; relative to underscores, underscores cannot even theoretically have any problems at all.
- deleted 4y ago[deleted]
- wizofaus 4y agoUse non-breaking space for identifiers and regular/breaking space as a delimiter? Admittedly you'd want an editor that clearly showed the difference and made the former easy to type.
- userbinator 4y agoBut I don’t know the consequences to the rest of the grammar We have various natural languages to tell us: https://en.wikipedia.org/wiki/Syntactic_ambiguity https://en.wikipedia.org/wiki/Syntactic_ambiguity
- orbital223 4y agoDAX, used in Microsoft's Power BI, allows for identifiers with spaces.