• erogenouswarzone@lemmy.ml
    link
    fedilink
    arrow-up
    30
    arrow-down
    2
    ·
    edit-2
    1 year ago

    It would be great to use some emojis in coding.

    Imagine how much more readable it would be if you could break a loop with 💀 or return true with 👍. Or use ❓for ifs, or ↔️ for switch (the emoji didn’t work for that one). Or use an emoji to represent a custom object?

    Maybe the ECMA should get on that!

    Edit: I guess you can use emojis for custom objects in js.

    • SubArcticTundra@lemmy.ml
      link
      fedilink
      arrow-up
      5
      ·
      1 year ago

      You’d still be left with the brackets and braces though. It might make more sense in a whitespace-based language pike Python

      • erogenouswarzone@lemmy.ml
        link
        fedilink
        arrow-up
        6
        arrow-down
        1
        ·
        1 year ago

        I see your point. Personally, I like the brackets and braces, they help organize. Or maybe that’s just what I’m used to.

    • jimmux@programming.dev
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      Programming typefaces with ligatures are a step in this direction.

      I would try this in something like Haskell, where some of the more exotic character sequences get tricky to recognise.

      Unison might be the best language to test this in. Having identifiers separate from the actual definitions, you can call anything whatever you want.

    • aard@kyu.de
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      emacs lisp already lets you use the full range of unicode.