Made with KolourPaint and screenshots from Kate (with the GitHub theme).

  • AnotherPenguin@programming.dev
    link
    fedilink
    English
    arrow-up
    3
    ·
    14 hours ago

    At least in C#, you can define variables with keyword names like this:

    var @struct = “abc”

    I think in Kotlin you can do the same, and even include spaces with backticks like val abstract class = “abc”

    I’m not sure if other languages allow that, regardless it should be rarely used.

    • pivot_root@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      14 hours ago

      Swift also uses backticks and Rust has a dumb one in the form of r#thekeyword. Still much better than introducing a async as a new keyword in a minor version of a language and breaking a bunch of libraries.