• Blue_Morpho@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    2 days ago

    It must be c# because of foreach but the arguments aren’t right. I pasted into an online c# and it errored out. Maybe the screen capped cursor is blocking something?

    • dfyx@lemmy.helios42.de
      link
      fedilink
      arrow-up
      12
      ·
      edit-2
      2 days ago

      Definitely not C#. Wrong syntax for main, wrong syntax for foreach (C# has foreach (var i in someCollection) and what even is this method call syntax with =?

      Edit: I dug around the website. It’s D. I’m still confused about the method call syntax though. Usually, D uses parentheses like most other C-style languages. Must be some weird syntax where you can call methods like property setters which was useful for this particular code golf challenge.