SDF Chatter
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
vrek@programming.dev to Programming@programming.devEnglish · 1 year ago

Does C# (or any other languages) have an official style guide like python has pep8?

message-square
message-square
47
fedilink
84
message-square

Does C# (or any other languages) have an official style guide like python has pep8?

vrek@programming.dev to Programming@programming.devEnglish · 1 year ago
message-square
47
fedilink
  • navigatron@beehaw.org
    link
    fedilink
    arrow-up
    4
    ·
    1 year ago

    JavaScript / TypeScript are famously free-form, but a number of styles (and style-enforcing tools) have emerged.

    “Prettier” is the most recent. It actually parses your code into an AST and then re-prints it according to its style.

    “ESLint” is the most widespread; it is more of a framework into which rules can be plugged.

    I use “XO”, which is essentially a custom eslint ruleset with a few other nice things tacked on.

    The best part of eslint/xo is the “—fix” command, which can auto-fix most mistakes.

    • stevecrox@kbin.social
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      The last part is why you use an IDE.

      Several of them will ingest prettier files to build code formatting rules

      • https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode
      • https://www.jetbrains.com/help/webstorm/prettier.html
      • https://marketplace.eclipse.org/content/prettier-formatter

      IDE support is normally a good way to work out what the wider community is using.

Programming@programming.dev

programming@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programming@programming.dev

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 658 users / day
  • 1.02K users / week
  • 2.82K users / month
  • 7.11K users / 6 months
  • 311 local subscribers
  • 20.2K subscribers
  • 2.21K Posts
  • 34.7K Comments
  • Modlog
  • mods:
  • snowe@programming.dev
  • Ategon@programming.dev
  • MaungaHikoi@lemmy.nz
  • BE: 0.19.8
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org