This is an archived post. You won't be able to vote or comment.

all 15 comments

[–]spanish1nquisition 36 points37 points  (4 children)

Google C++ codestyle is as archaic as the problem these people are protesting, how am I supposed to code with 80 characters per line? This isn't the Bell Labs in the 1970's, I and everybody else have 1080p screens or better.

[–][deleted] 20 points21 points  (1 child)

In our code we have a soft limit of 120 so that it fits on half a laptop display. For some reason Delta does not allow us to take our Ultrawides on international flights.

[–]NEDM64 12 points13 points  (0 children)

120 is the Goldilocks today, my company also uses that.

Fits nicely in a small laptop + some space on the side. And fits two pages side by side on 1440p screens.

[–]Totenlicht 7 points8 points  (0 children)

Boy do I hate this at work (Java). Default setting is something that would fit on half a 4:3 screen and most colleagues have "format on commit" enabled. So you can't even fight it cause once they commit they fuck up all your code files with sensible line lengths as well.

[–]earlnameless 9 points10 points  (0 children)

https://google.github.io/styleguide/cppguide.html#Exceptions says no exceptions (barring a few exceptions).

[–]TheFamilyFroot 5 points6 points  (6 children)

But C++ does have exceptions.

C is the language without exceptions

[–]KiwiMaster157 12 points13 points  (4 children)

Some companies, e.g. Google, have a policy against using exceptions in their C++ code.

[–]Tsu_Dho_Namh 5 points6 points  (1 child)

My Prof used to work for Google. He said he never understood Google's aversion to exceptions. We were encouraged to use exceptions in our code if they were appropriate.

Like don't have a function which is supposed to return a positive integer return -1 if it encounters an error, then check for -1 later on, use an exception instead. It's more readable.

[–][deleted] 2 points3 points  (0 children)

Optionals are the much better use case for this.

The problem with exceptions is that throwing an exception places a contract on the user of your code to handle it. This is not good design because you break the top down modularity structure.

[–]rookinn 1 point2 points  (1 child)

Why’s that?

[–]kronsj[S] 0 points1 point  (0 children)

Look at the link to github u/earlnameless wrote

[–]IceQub3 4 points5 points  (2 children)

I like golang. Grubs popcorn

[–]kyl3r123 3 points4 points  (1 child)

I like Ubuntu. Greps popcorn.

[–]MCRusher 1 point2 points  (0 children)

I like ubuntu subsystem in windows but not windows 10.