this post was submitted on 27 Dec 2023
83 points (97.7% liked)

Programming

17419 readers
50 users here now

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 [email protected]



founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 45 points 10 months ago (12 children)

Since you specifically mentioned C# : https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/coding-conventions

I'd be surprised if there is a serious language that doesn't come with at least some semi-official style guide. But usually they are not universally followed and everybody just does their own thing.

[–] [email protected] 7 points 10 months ago* (last edited 10 months ago) (7 children)

I'd be surprised if there is a serious language that doesn't come with at least some semi-official style guide.

Does JavaScript have one?

Edit: Except google's style guide

[–] [email protected] 10 points 10 months ago (3 children)

Edit: Except google's style guide

This legit made me laugh lol, Google's style guides for their longer standing languages are always dismissed, especially their one for C++

[–] [email protected] 3 points 10 months ago (1 children)

What is wrong with Google's C++ guide?

[–] [email protected] 6 points 10 months ago

To summarize the explanations i've come across: It's tailored to Google's internal teams maintaining tons of legacy C++ code, doesn't cover exception handling, and generally has outdated advice best suited for the code they developed in that time period. While their style guide is ideal for maintaining consistency with Google's existing codebase, someone working on a modern C++ project should consider using the language's more modern features and STL components

Something I'd want to note though, someone developing in C++ for an embedded platform or even working on hardware drivers would probably have very lean and mean code which doesn't conform to a particular style guide, especially ones advising against use of "unsafe" operations.

load more comments (1 replies)
load more comments (4 replies)
load more comments (8 replies)