cultural reviewer and dabbler in stylistic premonitions

  • 31 Posts
  • 105 Comments
Joined 3 years ago
cake
Cake day: January 17th, 2022

help-circle




















  • i don’t usually cross-post my comments but I think this one from a cross-post of this meme in programmerhumor is worth sharing here:

    The statement in this meme is false. There are many programming languages which can be written by humans but which are intended primarily to be generated by other programs (such as compilers for higher-level languages).

    The distinction can sometimes be missed even by people who are successfully writing code in these languages; this comment from Jeffrey Friedl (author of the book Mastering Regular Expressions) stuck with me:

    I’ve written full-fledged applications in PostScript – it can be done – but it’s important to remember that PostScript has been designed for machine-generated scripts. A human does not normally code in PostScript directly, but rather, they write a program in another language that produces PostScript to do what they want. (I realized this after having written said applications :-)) —Jeffrey

    (there is a lot of fascinating history in that thread on his blog…)



  • yes, when the month is written non-numerically (and the year is written with four digits) there is no ambiguity.

    but, the three formats in OP’s post are all about writing things numerically.

    In some contexts, writing out the full month name can be clearer (at least for speakers of the language you’re writing in), but it takes more (and a variable amount of) space and the strings cannot be sorted without first parsing them into date objects.

    Anywhere you want or need to write a date numerically, ISO-8601 is obviously much better and should always be used (except in the many cases where the stupid formats are required by custom or law).