top | item 47167406

(no title)

dmit | 4 days ago

No it won't? That's exactly the point -- each of those people will be viewing the code in their own preferred syntax. If there is semantic nuance in the writer's syntax, the reader will see it presented in the best way their preferred syntax's representation can provide.

Imagine all the hours saved that are currently spent on tired tabs vs spaces debates, or manicuring .prettierrc, etc etc. The color of the bike shed might matter (sometimes a lot) to some people, I know, but it's storing bikes away from the elements and thieves that is the goal, not obsessing over optimizing something that is demonstrably a subjective matter of taste.

discuss

order

phailhaus|4 days ago

Those are both formatting examples though? You're suggesting totally different syntaxes, which means you can't even point to the same line in a codebase when talking about a PR. This throws up massive hurdles around communication when you could just agree on one standard and move on.

dmit|4 days ago

  class Bean {
    private boolean sprouted;

    public void sprout() {
      this.sprouted = true;
      // ...
    }
  }
or

  data Bean = Dormant | Sprouted
  
  sprout :: Bean -> Bean
  sprout Dormant = Sprouted
  sprout Sprouted = -- aw, beans, we could have modeled
                    -- this state as impossible to construct,
                    -- but you chose runtime checks, so
                    -- here we are.
As for pointing to the source line, I think JavaScript people solved that one for us with source maps. Just because we download and execute a single 4Mb line of minified code, doesn't mean we can't tell which line of the original source caused the error. :)