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

  • Oriel Jutty :hhHHHAAAH:
    link
    fedilink
    1419 hours ago

    Because let x: y is syntactically unambiguous, but you need to know that y names a type in order to correctly parse y x. (Or at least that’s the case in C where a(b) may be a variable declaration or a function call depending on what typedefs are in scope.)

    • @HiddenLayer555@lemmy.mlOP
      link
      fedilink
      English
      9
      edit-2
      18 hours ago

      Can’t say I’ve ever experienced this kind of confusion in Java but that’s probably because they intentionally restricted the syntax so there’s no ambiguity.