22 ms·
How to Use Em Dashes (–), En Dashes (–), and Hyphens (-)
- 867-5309 2y agominus (US negative) enters the chat..
- crazygringo 2y agoSeriously. If you want your − + to match, in terms of crossbar vertical position and width.
- culi 2y agoFor comparison— − + minus sign - + hyphen – + en dash — + em dash −+-+–+—
- perilunar 2y agoThe correct minus sign looks a lot clearer than a hyphen-minus when printing out negative numbers, especially at small font sizes. I have in the past written code to convert them.
- perihelions 2y agoDupe—https://news.ycombinator.com/item?id=43447819 https://news.ycombinator.com/item?id=43447819 ("How to use an en-dash and em-dash correctly?", 43 comments)
- jimnotgym 2y agoMore interestingly it is the same highly niche subject from two different websites in two days. HN is...different
- A_D_E_P_T 2y agoAFAIK most computer keyboards don't have em dashes. Rather than hit ALT+0151 every time, I've always just strung along two hyphens, like: -- Absolutely proper and correct use of em dashes, en dashes, and hyphens is, to me, the most obvious tell of the LLM writer. In fact, I think that you can use it to date internet writing in general. For it seems to me that real em dashes were uncommon pre-2022.
- thesauri 2y agoOn Macs: Hyphen -: - En Dash –: alt - Em Dash —: alt shift -
- alabastervlog 2y agoThe default US English Mac keyboard is so extremely good, and has been the way it is for so long, that I remain baffled that other platforms haven't simply copied it. I came to it relatively late in life and it's one of the reasons I wish I'd started using Macs sooner.
- agys 2y agoThis specific key combination is not US keyboard specific. I like how they managed to group characters that are formally similar by binding them to the same keys. Examples: en and em are on - Below are maybe Swiss specific? ~ is on N @ is on G | and \ and / are on 7 √ is on V ¥ is on Y and € is on E ∑ on W ( ∑ is a rotated W :) etc.
- alabastervlog 2y agoYeah, mostly the same on my US keyboard, except a couple like "@" (that's shift-2 on basically all US keyboards, and is printed on the key) and |/\, which are more prominent on US keyboards (two simply have their own keys, no shift modifier, even). I get the © symbol for option+g (which still kind-of makes sense!) I appreciate that the designer of the layout clearly attempted to make some kind of mnemonic connection to the degree they could. Makes it easier to discover and remember the key-combos, even without a cheat sheet.
- the__alchemist 2y agoIf you're on Windows, install PowerToys, and check out the KeyBoard manager. It lets you set up shortcuts. I overload my keys using right alt for greek letters. (science stuff). Could do it for these dashes as well.
- a3w 2y ago> spans pages 128–34. Who omits the 1 from the second number?! That is aweful!
- mkehrt 2y agoWhat if it's 124 to 127? would you really type 124–127, or 124–7?
- rossant 2y agoWhen I was editing an academic book published by a well-known university press, we were all asked to do that for the references. (And my colleagues, all doctors and lawyers, only knew Word and entered the references manually.)
- crazygringo 2y agoWho keeps the 1? You write pages 1,003–4, instead of typing out 1,003–1,004 which is just unnecessary. Works the same with two digits, or even three: pp. 1,899–902. This is standard practice and arguably clearer. I've only ever seen it done with page ranges, though. I'm not sure if it's done with year ranges? E.g. 1984–5? Or 1989–92? You work with page ranges constantly in academia, I just don't see year ranges much in any form.
- lucgommans 2y ago
- zahlman 2y ago$ python -m this | grep '--' -
- nextts 2y agoAs long as "this" is not a typical README.md with code snippets.
- lucgommans 2y agoIs this meaning to grep for a double hyphen from standard in, or to mark the start of positional arguments and then grep for a hyphen? If you want both, it should be: $ python -m this | grep -- -- - Which is just beautiful (Your example causes the last hyphen to be grepped for, which happens to only match doubled-up ones because single ones don't occur in that text. The quotes/apostrophes do nothing because they're parsed by (ba)sh and so only the hyphens are passed to grep, not the quotes. The last hyphen can be omitted because reading from stdin is the default if neither filenames nor recursion options are passed.)
- zahlman 2y agoOh, of course simply quoting it doesn't disable the special meaning of --, because quoting is handled by the shell and argument parsing is handled by the program.
- zahlman 2y ago(Although that turns out not to matter for this particular grep invocation; the -- is still interpreted as a pattern and - as standard input.)
- rednafi 2y agoI like em dashes and use “Option Shift -” to summon them on macOS. However, LLMs tend to overuse them and compose absurdly long sentences. While proofreading a draft, I often instruct an LLM to “keep the original tone intact and don’t create overly complex sentences by fusing together simple ones.” That usually gets the job done. Writers adores their em dashes. While they can sometimes clarify a concept by adding more context, overusing them can hurt readability. I prefer to read Hemingway-esque sentences that just say what they want to say and end sharply. So that’s how I write too—and sometimes the overuse of em dashes directly conflicts with that, making the content sound as if the author is confused about what they wanted to convey.
- CRConrad 2y ago> LLMs tend to overuse [em dashes] and compose absurdly long sentences. So do I.
- sandbach 2y agoRobert Bringhurst¹ prefers the en dash in the context of setting off phrases: "The em dash is the nineteenth-century standard, still prescribed in many editorial style books, but the em dash is too long for use with the best text faces. Like the oversized space between sentences, it belongs to the padded and corseted aesthetic of Victorian typography. "Used as a phrase marker – thus – the en dash is set with a normal word space either side." ¹https://archive.org/details/isbn_9780881791327/page/80/mode/1up https://archive.org/details/isbn_9780881791327/page/80/mode/...
- milesrout 2y agoMr Bringhurst is wrong. Em dashes have nothing to do with Victorian aesthetics.
- asplake 2y agoI think of that as “British” style (as opposed to American). I think it’s more common here and I certainly prefer it
- tkcranny 2y agoPresently re-reading this book, The Elements of Typographic Style. It’s one of the few books I’ve gone out of my way to get a physical copy of – it’s just beautiful. And I totally agree, space-set en dashes are vastly superior to em. I dislike the way it connects the word more closely to the word in the next clause than the phrase itself. E.g. He left—no explanation. Vs. He left – no explanation. To me, left—no feels like a weird gluing together than a separator for a different section.
- munificent 2y agoBecause I am exactly the kind of person to obsess about this sort of thing, when I was working on my last book, I spent a lot of time deciding how I wanted to style dashed subordinate clauses. Personally, I think en dashes are too small and look like a mistaken use of a hyphen. I really only use them in their Chicago Manual of Style recommended uses like date ranges. But I agree that em dashes without spaces around them look wrong. They glue the adjoining words together when the whole point is that the clause is secondary and should be set aside from the surrounding text. I ended up using em dashes with a little blob of CSS to put a tiny amount of space on either side.
- bangaladore 2y agoSomewhat off topic, however, I'm thoroughly convinced that there is a very high probability something is AI generated when I see Em dashes. Anyone else noticing this? ChatGPT for example almost always uses them. I'm sure they are more common in academic writing, but its now super common on boards like Reddit.
- mychaelangelo 2y agoI’ve noticed this, too. ChatGPT especially overuses them relative to other models. It’s an easy tell-sign that something is probably LLM-written.
- zimpenfish 2y agoI saw a reel the other day where some Young People(tm) were talking about "the ChatGPT hyphen" (an em-dash.) There was much wailing and gnashing of (false) teeth from Old People(tm) in the comments.
- pavlov 2y agoIt’s largely the Baader-Meinhof phenomenon. You’ve started noticing it because you just learned about it.
- dkdcwashere 2y agoyep. been using them for years. others have too. it’s not weird same thing happened with “delve” — these are just words and grammar, people use them there is no accurate way to tell whether text came out of a neural network or not
- chatmasta 2y agoI’m not sure the same happened with “delve.” I saw an analysis of paper abstracts showing a clear uptick of “delve” starting with the mass-adoption of ChatGPT. Maybe it suddenly became a trendy word — especially in paper abstracts — or maybe more paper abstracts were edited by ChatGPT.
- cporios 2y agoif anyone's wondering, the post title is wrong -- both of the first two characters are en dashes (U+2013).
- jeroenhd 2y agoThat's actually kind of funny. Looks like it's the result of HN's Unicode filtering rules, though; the original website has different characters in its <title> tag.
- babypuncher 2y agoOr, you can avoid an awful lot of headache by just sticking to hyphens.
- culi 2y ago> If you want to be official about things, use the en dash to replace a hyphen in compound adjectives when at least one of the elements is a two-word compound. How is a literal dictionary making fun of people who "wanna be official about things" lol. That's the entire basis for dictionaries themselves
- mikethemerry 2y agoIt's Merriam-Webster - they are descriptivist rather than prescriptivist about language. They don't define correct usage per se, but rather document actual usage, though some usage may be given greater weight than others. In this case, they are calling out the prescriptivist definition but are implying that it may be overkill and offering the more commonly used alternative.
- nayuki 2y agoAdditionally: * Use the minus sign /−/ (U+2212) when formatting numbers, because the default hyphen-minus /-/ (U+2D) just looks wrong: "It is −1 °C vs. -1 °C." Moreover, the correct minus has the same width as plus (− vs. +). * Rare, but use the figure dash /‒/ (U+2012) or figure space / / (U+2007) if you need a placeholder character that is the same width as a single digit. For example, "Guess the PIN: 1‒34."
- ludicity 2y agoI use em-dashes correctly because a reader emailed me, and I was dreadfully embarrassed. You can actually see them become correct in my writing after the "I will pile drive you" AI thing. It never occurred to me that doing this correctly might make people think I use LLMs in my writing. Edit: I'm sure the many typos protect me from that, actually.
- o11c 2y agoOne point that is very rarely mentioned is how to place em dashes around quotations marks. If the em dash indicates an interruption (not a planned pause) of the actual speech, the em dashes go inside the quotes (often just one, before the closing quote). If the em dash is the narrator interjecting with additional information, the em dashes go outside the quotes. Besides this, the question of where to put spaces when multiple forms of punctuation are combined can be quite a complex topic.
- numbers 2y agoOn macOS you can enter these by doing the following: * em dash: ⌥ + ⇧ + - (alt + shift + hyphen) * en dash: ⌥ + - (alt + hyphen)
- appleorchard46 2y agoHot take - differentiating between these at all is dumb. There is virtually no situation when using one instead of another improves clarity.
- lucgommans 2y agoIt is usually clear that 2-3 thingies means a range of thingies, but I seem to remember there being situations where it could also have been a minus sign. Perhaps it was with placeholders, where 10-N could be either one. Problem is, iirc, the real minus sign is longer than the hyphen, looking like an en dash (the one meant for ranges) and so it defeats the purpose... hence I totally use hyphens as minus signs, but en dashes for ranges, which makes sense in my head because a range has a certain span/length whereas a minus sign is just a little mark to indicate that something is negative. I see lots of people/software use en dashes for ranges but the existence of a real minus sign is, from my perspective, mostly just noted in typographic resources, so I think this reflects most people's usages (for the people that care for these details) I do like that the em dash is as long as it feels that broken-off thoughts should be Not everything has to be functional, sometimes things can also just look nice for the sake of it
- Starlevel004 2y agoI refuse to care about this. A single dash is all I will ever use. I see no possible reason to use the other two.
- theelous3 2y agoThrowing my hat in here. The sub millimeter difference in the length of a dash conveys no additional meaning or clarity. It is impossible to argue me out of this position. It's not like you can reliably write these consistently by hand either without going over the top in length to make it extremely obvious.
- miltonlost 2y agoLength of breath/pause with a longer dash. Read some -- Emily Dickinson poems – you'll find a world ––– of meaning ––– in the millimeter.
- theelous3 2y agoI have read her in the past and can't say there were world's of meaning between -'s. Can you link an example? I looked again and couldn't see any obvious ones. Generally she just completely abused the -. Does she even use a comma once? lol
- handoflixue 2y ago
- colanderman 2y agoNote also that the "hyphen" on your keyboard is actually a "hyphen-minus". Unicode provides separate characters for hyphen (‐) and minus (−).
- phkahler 2y agoLet's not forget the minus symbol at U2212. I was making a Simulink like diagram editor and the dashes just didn't look good. 2212 worked nicely.
- starfezzy 2y agoWe need a blog post documenting the ironic trend of people—themselves NPCs, actual human bots, just now realizing the em dash exists despite seeing it hundreds if not thousands of times before LLMs—flattering themselves by suggesting that anyone who understands the language at above a 5th grade level must be an LLM.
- citrus1330 2y agoYou aren't special for using em dashes, and it doesn't make someone an NPC to notice that AIs frequently make use of them.
- ogurechny 2y agoThe comment above is not about being special, it is about proper typography that is still everywhere around us: books, serious websites, anything done by real designers. Those people had to try hard to miss all of that. No, it is not “politically incorrect” to call people lacking curiosity and/or education like you see them. No, someone's personal preferences or transitory fashions are not automatically promoted to the holy reference for the whole world.
- jeroenhd 2y agoTaking knowledge of the three extra pixels that are "more correct" as some kind of indicator of intelligence is silly. Pretending you're somehow above them is just sad. Must be lonely at the top.
- MindBeams 2y agoThis thread is rampant with anti-intellectualism that deserves to be called out.
- dankwizard 2y agoa human has never used an em dash in the wild
- apparent 2y agoThis shows both the en dashes and hyphens for page ranges. Is one preferred?
- TomasEkeli 2y agoI'm just gonna say it: this does not matter. Just use whatever you want. If you're afraid that someone is going to think less of you for it: the people who matter won't.
- efilife 2y agoFor those who downvoted this - how does a millimeter of difference in the length of a line matter?
- scottyeager 2y agoWell-meaning can vary if you don't put spaces around your dashes, and a well—meaning writer wants to ease the job of the reader. ıt might simpıy not matter though, a miııimeter here and there, ı suppose.
- rkosk 2y agoThe difference in dash length really doesn't matter and your example is not the same at all, but it probably made you feel really smart.
- MindBeams 2y agoDid you mix those up on purpose?
- roryokane 2y agoAn excellent example of why dash length matters. Because of the wrong usage of ‘—’ and ‘-’, it took me 10 more seconds of rereading and re-parsing your comment to understand what that first sentence meant. I see what you did in the second paragraph too. It’s another example of “a millimeter of difference in the length of a line” mattering in that it looks weird, though it’s not much harder to read.
- scottyeager 2y agoThe undotted small "i" character comes from the modern Turkish alphabet. It's perhaps only slightly disorienting for an English reader to slightly shorten some letters that are just lines in a sans-serif font. In Turkish though, a millimeter of line can make an entirely different letter. Being able to render a variety of line lengths with different meanings is a cool and useful thing.
- rsch 2y agoToday in “typesetting before we had typewriters”: … At least we have dedicated O/0, and l/1 keys now. But we still see a lot of "straight" quotes instead of “those smart quotes Microsoft Word likes to generate”. And dashes. Did you know there is a dedicated ellipsis character? This is often set with slightly more space between dots than ..., and it by definition never wraps across a line between those dots. You still see (C) instead of ©. It is one of those things that doesn’t really matter for readability, but although they can’t necessarily put a finger on why, people may still notice that some documents or pages appear to be set with more care for details than others. (edit: I guess if you don’t have to search on Google what the hell a ‘Microsoft Word’ is, then you’re officially old)
- thangalin 2y ago> dedicated O/0, and l/1 keys now And the 1 and 8 aren't next to each other anymore, either. (See typewriters from the "18"00s.) > those smart quotes Fixing straight quotes is a hard problem[0]. My FOSS text editor, KeenWrite[1], includes my library, KeenQuotes[2], for replacing them at build time. It's not perfect, but can typeset my ~400 page novel without any errors. > Did you know there is a dedicated ellipsis character? Yes! Here's where it gets parsed: https://gitlab.com/DaveJarvis/KeenQuotes/-/blob/main/src/main/java/com/whitemagicsoftware/keenquotes/lex/Lexer.java#L126 https://gitlab.com/DaveJarvis/KeenQuotes/-/blob/main/src/mai... Then emitted: https://gitlab.com/DaveJarvis/KeenQuotes/-/blob/main/src/main/java/com/whitemagicsoftware/keenquotes/parser/QuoteEmitter.java#L390 https://gitlab.com/DaveJarvis/KeenQuotes/-/blob/main/src/mai... Then transformed into an HTML entity: https://gitlab.com/DaveJarvis/KeenQuotes/-/blob/main/src/main/java/com/whitemagicsoftware/keenquotes/parser/Token.java#L38 https://gitlab.com/DaveJarvis/KeenQuotes/-/blob/main/src/mai... When typesetting Markdown, KeenWrite first converts the document to XHTML (i.e., XML), then invokes ConTeXt to convert XML into TeX macros. One of those macros handles the ellipses by converting it to \dots{}: https://gitlab.com/DaveJarvis/keenwrite-themes/-/blob/main/xhtml/xml-entities.tex?ref_type=heads#L28 https://gitlab.com/DaveJarvis/keenwrite-themes/-/blob/main/x... This renders as the Unicode character in the final document: … > set with more care for details Some of us old folks care about these details. ;-) [0]: https://stackoverflow.com/a/73466438/59087 https://stackoverflow.com/a/73466438/59087 [1]: https://keenwrite.com/ https://keenwrite.com/ [2]: https://whitemagicsoftware.com/keenquotes https://whitemagicsoftware.com/keenquotes
- mvdtnz 2y agoI genuinely do not care one tiny bit about doing this right. At all. I will use the minus key for all of these like I always have and nothing bad will ever come of it. Find a better way to channel your limited energy.
- mmooss 2y agoHere's an easy, if not always precise way to remember: * Hyphens connect things, such as compound words: double-decker, cut-and-dried, 212-555-5555. * EN dashes make a range between things: Boston–San Francisco flight, 10–20 years: both connect not only the endpoints, but define that all the space between is included. (Compare the last usage with the phone number example under Hyphens.) * EM dashes break things, such as sentences or thoughts: 'What the—!'; A paragraph should express one idea—but rules are made to be broken. Unicode has the original ASCII hyphen-minus (U+002d), as well as a dedicated hyphen (U+2010), other functional hyphens such as soft and non-breaking hyphens, and a dedicated minus sign (U+2212), and some variations of minus such as subscript, superscript, etc. There's also the figure dash "‒" (U+2012), essentally a hyphen-minus that's the same width as numbers and used aesthetically for typsetting, afaik. And don't overlook two-em-dashes "⸺" and three-em-dashes "⸻" and horizontal bars "―", the latter used like quotation marks!
- st_goliath 2y agoAlso, not to be confused with "一", which is a different thing entirely……
- mortos 2y agoThis one is U+4E00, CJK Unified Ideograph-4E00. So it's a common character between Chinese, Japanese, and Korean. This should be "one" in all three. And it does technically look a little different than a dash: https://unicodeplus.com/U+4E00 https://unicodeplus.com/U+4E00
- KPGv2 2y agoAnd this is different from Japanese's chuuonpu (U+30FC) which is a vowel elongation mark, and it's rendered horizontally or vertically depending on whether the text direction is horizontal or vertical, respectively. ー
- deleted 2y ago[deleted]
- 2y ago
- darajava 2y agoMost people don't use the em dash. It's too hard to type and looks too similar to a hyphen. As a result, a hallmark of GPT-generated text is its (over)using of the em dash--I have stopped using it for this reason an just use two hyphens now instead.
- emmelaich 2y agoYou mean en dash?
- darajava 2y agoNo. Em dashes are to separate two thoughts in one sentence. En dashes are for denoting ranges.
- grey413 2y agoMost people don't use em dashes... apart from professional and skilled writers, who use them regularly. It's a bit of a problem that the same character is both a mark of LLMs and skilled writing.
- darajava 2y agoYes, true! I was tired when I clumsily made that point above (I am not a skilled writer). I learned how to use the em dash properly about 6 months before the release of ChatGPT and then when it was released I realized that it used them all the time. So, to convince people that I both know basic grammar and I am human I started to use "--" instead of "—".
- sethaurus 2y agoFor anyone finding em-dashes too small, behold the majesty of U+2E3B, the triple-em dash: ⸻
- kazinator 2y agoUse three repetitions of the ASCII minus for em-dash, two for en-dash. Do not use the Unicode characters, or people will think you are an AI bot.
- rappatic 2y agoI use em dashes all the time in writing, but unfortunately ChatGPT and co. use the em dash frequently—and most people use the em dash infrequently, not knowing how to type it on a keyboard—so it's starting to make my writing look AI-generated sometimes. I fear it'll have to go the way of words like "tapestry." FWIW, you can type an em dash on Mac with shift + option + hyphen.
- fastball 2y agoI use them as well. For blog posts I suppose I'll need to switch to regular hyphens lest people think all my writing is LLM-spam. That said, I don't even think you need the [shift] for em dash on Mac – just [option] + [hyphen] works for me.
- contact9879 2y agoThat's an en-dash
- fastball 2y agoOh yeah, true. They look the exact same in the HN editor haha
- pama 2y agoEmbrace the confusion with the AI—it’s a sign of progress!
- keybored 2y agoThree^W Four top-level comments so far with this concern. Nice try AIs but I won’t downgrade my writing.
- wraptile 2y agoEm dashes without surrounding spaces is such a ugly relic that triggers me to no end and is objectively wrong. The dash object is part of the sentence — not the two words it's separating.
- Imagenuity 2y agoI agree, this bugs me too.
- keybored 2y agoUsing em-dash with spaces takes up way too much space. Use an en-dash then instead. The perfect way to surround with hairspace.
- anon1094 2y agoI've been writing for years and never used en or em dashes before LLMs.
- Imagenuity 2y agoI could never remember which was the longer dash. Now it's easy, because the en dash – is the approximate length of a capital N, and a em dash — is the approximate length of a capital M. Today I Learned!
- porridgeraisin 2y agoI simply do not care. I will just use - (the one next to zero on the keyboard) everywhere. There are a grand total of zero situations where using one in place of the other hampers information reconstruction or reading comprehension (although the latter is subjective, I suppose)
- lispybanana 2y agoSuper- or subhuman intelligence can be identified in the pre-Mason–Dixon line era.
- low_tech_punk 2y agoThe problem with en and em dash is that 1) they are too hard to type. 2) using them without surrounding thin space or hairspace breaks the horizontal rhythm and draws unnecessary attention to the punctuation; but thin and hair spaces are equally hard to type 3) Most people write markdown with mono space fonts, making these dashes and spaces indistinguishable.
- perilunar 2y agoThe eternal debate between minimalism and the ornate. There's room for both: when presentation matters I use them; when it doesn't, I don't.
- Stratoscope 2y agoI had one minor quarrel with this article: The use of spaces (of any kind) before and after the em dash or any dashes. Personally, I am fond of using either a hair space or a thin space before and after the em dash. Not a full space! To explore the various options, I wrote a little program to print the various combinations of dashes and spaces. I think what looks best depends a lot on what typeface you're using. But let's see how they look in the Verdana font used here. You should be able to paste this into your favorite word processor to see it in other fonts: ASCII 0x2D hyphen-with no spaces ASCII 0x2D hyphen - with U+200A hair spaces ASCII 0x2D hyphen - with U+2009 thin spaces ASCII 0x2D hyphen - with 0x20 full spaces Unicode U+2010 hyphen‐with no spaces Unicode U+2010 hyphen ‐ with U+200A hair spaces Unicode U+2010 hyphen ‐ with U+2009 thin spaces Unicode U+2010 hyphen ‐ with 0x20 full spaces Unicode U+2013 en dash–with no spaces Unicode U+2013 en dash – with U+200A hair spaces Unicode U+2013 en dash – with U+2009 thin spaces Unicode U+2013 en dash – with 0x20 full spaces Unicode U+2014 em dash—with no spaces Unicode U+2014 em dash — with U+200A hair spaces Unicode U+2014 em dash — with U+2009 thin spaces Unicode U+2014 em dash — with 0x20 full spaces It looks like HN is really mangling this. Hair spaces are rendered wider than thin spaces? If anyone wants to experiment, here is the Python code: from dataclasses import dataclass @dataclass class Character: char: str name: str DASHES = [ Character( "-", "ASCII 0x2D hyphen" ), Character( "\u2010", "Unicode U+2010 hyphen" ), Character( "\u2013", "Unicode U+2013 en dash" ), Character( "\u2014", "Unicode U+2014 em dash" ), ] SPACES = [ Character( "", "no" ), Character( "\u200A", "U+200A hair" ), Character( "\u2009", "U+2009 thin" ), Character( "\x20", "0x20 full" ), ] for dash in DASHES: for space in SPACES: print( f"{dash.name}{space.char}{dash.char}{space.char}with {space.name} spaces\n" )
- aorth 2y agoI read Butterick's Hyphens and dashes some years ago and it stuck with me. Now I regularly use hyphens, en dashes, and em dashes correctly—I even memorized the Unicode sequences and enter them seamlessly on Linux with Ctrl-Shift-U! https://practicaltypography.com/hyphens-and-dashes.html https://practicaltypography.com/hyphens-and-dashes.html
- uneekname 2y agoCame here to post the same link! That book is wonderfully opinionated and has helped clarify some typographic concepts for me
- lloeki 2y ago> The en dash is the least loved of all; it’s not easily rendered by the average keyboard user (one has to select it as a special character, whereas the em dash can be conjured with two hyphens) on macOS: - - => - (hyphen/minus) - ⌥ - => – (en dash) - ⇧ ⌥ - => — (em dash) There are so many of these convenient typographical shortcuts that a long time ago I made Apple layouts for Windows and Linux. And many are mnemonic too, like: - of course ÷ (division) is ⌥ / (slash, which is poor man's division) - of course ¿ is ⇧ ⌥ / because ⇧ / is ? so logically ⇧ ⌥ / is ⌥ ? which is ¿ - guess what ≤ ≥ ± ≠ are - ¬ (logical negation) is ⌥ L because it's a L sideways - £ (pound) is ⌥ 3 because ⇧ 3 is # (octothorpe, abused as sharp or pound - the other kind)
- 8bithero 2y agoThe only problem with correctly using the Em or En dash is that people will automatically assume the text was written by an LLM -_-
- Kiro 2y agoYeah, I've stopped using them because of this reason.
- lol768 2y agoThe more people proliferate this, the worse it'll be—frankly, we should be embarrassed that societal literacy and writing style knowledge is so poor that we jump to the "must be written by an LLM" conclusion whenever we see any sort of exotic character usage!
- quitit 2y agoInvoking these from the mac keyboard: Hyphen for hyphen Option + Hyphen for n-dash Shift + Option + Hyphen for m-dash While I'm here, Shift+Return for a soft return (i.e. not a new paragraph.)
- jeffhuys 2y agoI used a lot of these, but actually stopped due to my text sometimes being called out as chatgpt output. I also thorw in the occasional spelling mistake. If a piece of text on reddit/x has "–" (not "-") in it, you can be 95% sure it's an LLM.
- indexerror 2y agoThat is an interesting observation. I wonder what percentage of the training text data for LLMs contains proper dashes, since a large part of it is user-generated content.
- keybored 2y agoAll self-respecting journalistic outlets use proper symbols. Where does the LLM get their opinions on “foreign affairs” from? Probably from the likes of New York Times like a standard lib... And it shouldn’t be hard for an LLM to learn to use proper symbols when synthesizing content from the everyman. It’s not like it works on the level of literal copy and paste.
- jeffhuys 2y ago> Where does the LLM get their opinions on “foreign affairs” from? Yeah that's a big problem with LLMs at the moment - people are having an argument online, and one of them posts a piece of text from an LLM and says "see, Grok/ChatGPT/Claude/Gemini agrees! You're wrong!", which only reveals how much they did not do their homework and that they're arguing on the basis of hear-say, just like the LLM; the LLM has no mind of its own. If 90% of the internet says A, it will defend A to the death. What's not part of the equation is how much of that 90% has the same source, financed by a certain group. We have a LOT of work to do soon.
- the-mitr 2y agoIn LaTeX simple to remember hyphen (-), an en-dash (--), and an em-dash (---).
- renatoboo 2y agoMy therapist: "homoglyph and punycode attacks are made up term by computer people to justify their paycheck". Also Merriam-Webster:
- psychoslave 2y agoIf you are looking for alternative to kebab case to write identifier in programming language which reserve the - (U+002d) as an operator, chances are good you can use · (U+00B7 · MIDDLE DOT), that we use in middot case. So isMorePleasantToRead, is_more_pleasant_to_read or is·more·pleasant·to·read is up to you.
- nlitened 2y agoBut how pleasant is it to write?
- psychoslave 2y agoOn the bépo layout that I use, extremely well, as it sits between ’ (U+2019 ’ RIGHT SINGLE QUOTATION MARK) and ‑ (U+2011 ‑ NON-BREAKING HYPHEN), each being generated by altgr+shift and x . and k (which are all on the opposite side of the keyboard compared to altgr key). At least from the point of view of digital gymnastic, it’s not really any worst than camel or snake cases, though direct access to dash could be said to give a small facilitation for input in kebab case. So it really depends on the keyboard layout used (or whatever input device facility is used). What’s you favorite input method lately? Does it really doesn’t provide a convenient way to input more than ASCII visible glyphs? Plus, let’s be honest, identifiers are generally written in full expanse only once, then autocompletion is going to do it for us. And we all know we spend more time reading identifiers than declaring new ones.
- thomasjb 2y agoThis is intriguing to me, do you know which (programming) languages tolerate this?
- psychoslave 2y agoPython python3 -c "some·identifier = 0; print(some·identifier)" C echo -e '#include <stdio.h>\nint main() { int some·identifier = 0; printf("%d", some·identifier); return 0; }' | gcc -x c -o temp - && ./temp C++ echo '#include <iostream>\nint main() { int some·identifier = 0; std::cout << some·identifier; return 0; }' | g++ -x c++ -o temp - && ./temp Ruby ruby -e 'some·identifier = 0; puts some·identifier' Javascript node -e 'let some·identifier = 0; console.log(some·identifier);' Rust echo 'fn main() { let some·identifier = 0; println!("{}", some·identifier); }' > temp.rs && rustc temp.rs && ./temp Go throw an invalid character U+00B7 '·' in identifier Java throw error: illegal character: '\u00b7' C# is really annoyed with it apparently: echo 'using System; class Program { static void Main() { int some·identifier = 0; Console.WriteLine(some·identifier); } }' > Program.cs && mcs Program.cs && mono Program.exe Program.cs(1,60): error CS1056: Unexpected character `·' Program.cs(1,60): error CS1525: Unexpected symbol `identifier', expecting `,', `;', or `=' Program.cs(1,99): error CS1056: Unexpected character `·' Program.cs(1,99): error CS1525: Unexpected symbol `identifier' That’s it for the top in TIOB index I tested in the frame of this message.
- pwdisswordfishz 2y ago0 0 000048 48 H LATIN CAPITAL LETTER H 1 1 00006F 6F o LATIN SMALL LETTER O 2 2 000077 77 w LATIN SMALL LETTER W 3 3 000020 20 SPACE 4 4 000074 74 t LATIN SMALL LETTER T 5 5 00006F 6F o LATIN SMALL LETTER O 6 6 000020 20 SPACE 7 7 000055 55 U LATIN CAPITAL LETTER U 8 8 000073 73 s LATIN SMALL LETTER S 9 9 000065 65 e LATIN SMALL LETTER E 10 10 000020 20 SPACE 11 11 000045 45 E LATIN CAPITAL LETTER E 12 12 00006D 6D m LATIN SMALL LETTER M 13 13 000020 20 SPACE 14 14 000044 44 D LATIN CAPITAL LETTER D 15 15 000061 61 a LATIN SMALL LETTER A 16 16 000073 73 s LATIN SMALL LETTER S 17 17 000068 68 h LATIN SMALL LETTER H 18 18 000065 65 e LATIN SMALL LETTER E 19 19 000073 73 s LATIN SMALL LETTER S 20 20 000020 20 SPACE 21 21 000028 28 ( LEFT PARENTHESIS 22 22 002013 E2 80 93 – EN DASH 23 25 000029 29 ) RIGHT PARENTHESIS Ironic.
- kzrdude 2y agoThat's a problem on the HN side only, not in the article
- dwighttk 2y ago“So, you want to be accused of being an AI…”
- account42 2y agoThanks, but I'll keep using good old U+002D. Widening a glyph is a font/typesetting concern and doesn't make it a different character.
- velcrovan 2y agoHere's my AutoHotkey script for making my favorite punctuation hotkeys on my Windows laptops the same as my Mac: #-::Send("–") ; Win+- = en-dash #+-::Send("—") ; Win+SHIFT+- = em-dash #]::Send("‘") #+]::Send("’") #[::Send("“") #+[::Send("”") #;::Send("…") #+>::Send("→") #+<::Send("←") #8::Send("•") #+x::Send("×") ; multiplication symbol edit...downvoted, why? weird
- ubermonkey 2y agoI use the hyphen key, and hit it once for a hyphen or for a minus sign, and I use it twice for an em dash. At some point, many things I type into started replacing "--" with an em dash, but my precambrian computer typing muscle memory is fine with "hyphenhyphen" meaning "em dash". I will admit right here in front of god & everybody that I'm pretty sure I've never typed an en dash at all.
- MetaWhirledPeas 2y agoIf it's important in English, it should have a key on the keyboard. It follows that if it doesn't have a key, it's not important.
- fareesh 2y agoemdashes are on the rise thanks to people copying and pasting chatgpt
- kayo_20211030 2y agoIt might not be completely true that nobody cares, but I feel that almost nobody cares. > comma, a colon, or parenthesis They're all different. There is a difference between clear writing and typesetting. Why mix them up? A narcissism of small differences?
- graiz 2y agoHyphens - I'm normal, breaking up thoughts. En / Em - I'm an AI or I'm using AP style guide to write articles.
- MichaelDickens 2y agoIn that case, I guess I must be an AI—I use em-dashes all the time in casual text.
- bilater 2y agoI'm sick of em dashes cause somehow that's become the tell its AI generated text.
- dskhatri 2y agoFor Windows users, PowerToys has a Quick Accent tool, that lets you type in an em dash or figure dash by holding down the hyphen (-) and then toggling the space bar. Interestingly, the en dash is not available.
- pahbloo 2y agoFun fact: In Portuguese, the em dash is often used to introduce direct discourse, much like double quotes are used in English, but only when the direct discourse opens the paragraph. So instead of: "Hello," said John, "how are you today?" You'd see: — Hello — said John — how are you today?
- irrational 2y agoI’m all about spelling things correctly. To, too, two or their, there, they’re matter. But using the correct dash/hyphen is way too pedantic to me. In isolation, I can’t tell the difference between them.
- NegativeLatency 2y agoMy personal rule is simple I just use - for everything
- ergocoder 2y agoDON'T YOU DARE
- iLemming 2y agoSimple reminder for those who don't know this: the easiest way to insert em-dash in Vim-supported editor (Evil-mode in Emacs) is to use digraphs feature. In insert mode you'd press Control+k, then type a digraph sequence. For em-dash is `C-k -M` — you literally type: "Control+K minus capital M". For vanilla Emacs (without evil-mode), you can always do — "C-x 8 RET EM DASH" or "C-x 8 RET 2014". That's what "M-x describe-char" would tell you.
- CRConrad 2y agoI've been thinking about trying Emacs --- but if you have to type half a freaking novel just to get a dash...
- iLemming 2y agoOh, so you think Emacs in 2025 doesn't know what a "completion" is? Just because it started over forty years ago doesn't mean it's stuck in the past, you don't need to "type half a freaking" nothing. You know, I can too, play this game - in VSCode, the method of inserting an em-dash is different for all three platforms; IntelliJ, and Sublime don't even have the built-in feature like that - you gotta use 'snippets' or something. In contrast, Emacs and Vim knew how to do it probably before you even learned how to type, and the method has been consistent since then - you'd just learn how to do it once, and that knowledge is guaranteed to stay relevant even decades later.
- CRConrad 2y ago1) The comment I replied to said you had to type a long freaking incantation. I know nothing of this new place you're moving the goalposts to. That's actually my only real point; the following are bonus: 2) WTF does VSCode have to do with anything?!? Did I write "VSCode is so much better!" anywhere? Funny, can't recall that I did. 3) I took ten-finger-typing in högstadiet, ~"junior high" in Americanese, so about 1977-78. Cool IBM Selectrics, some of them with a built-in Tippex ribbon IIRC. (Didn't really take; I still use ~4-6 fingers.) Before that, I taught myself to type (with at least two fingers, maybe up to four) on a manual typewriter I got for Christmas in... 1975, 6? According to Wikipedia, Vi was first released with BSD in February 1978; Emacs was used internally at MIT from 1976. So pretty much a dead heat. Now you can go on playing your games, kiddo.