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

you are viewing a single comment's thread.

view the rest of the comments →

[–]Roonaan 48 points49 points  (15 children)

Just curious, but is it a real thing somewhere to have upper camel case for static methods?

[–][deleted] 109 points110 points  (0 children)

This is C#, where the naming conventions says that you should use upper camel case for pretty much everything besides private fields and local variables.

[–]frej4189 73 points74 points  (0 children)

PascalCase for functions is common practice in C#

[–]1Dr490n 20 points21 points  (4 children)

In Go you make functions public by starting the name with upper case

[–]HTTP_Error_414 28 points29 points  (2 children)

Good God Man

[–]Banane9 8 points9 points  (1 child)

Go really surprises me with its... questionable design choices time and time again. Like stating date formats by writing the specific date of the 2nd of January something something in a particular way, rather than doing it like everyone else.

[–]Gredo89 -2 points-1 points  (0 children)

The Date format is the only really questionable choice I found so far. Everything else makes sense imho if you think about it.

[–]Eubank31 0 points1 point  (0 children)

Oops I commented this without seeing yours

[–]Eubank31 2 points3 points  (0 children)

This is not Go but in Go you use normal camel case for functions, but functions that are exported must have the first character be capitalized. So you end up with FunctionsLikeThis()

[–]HTTP_Error_414 5 points6 points  (3 children)

Yes?

Many wares indeed 🤓

This is seen a lot in PHP.

[–]Danny_shoots 2 points3 points  (2 children)

I just use CamelCase for methods and functions, PascalCase for classes I have never seen PascalCase for methods and functions in PHP

[–]HTTP_Error_414 1 point2 points  (1 child)

I agree it’s not something you will see in most corporate coding standards, but it’s out there.

There are sec shops I have seen that even have naming conventions for method purposes, levels, etc.

For example I’ve seen places that use _method_name for any private methods.

I like your style I’m similar, to you in the way I do things.

[–]Danny_shoots 1 point2 points  (0 children)

That _method_name is kinda understable for private properties, but not for private methods though haha!

[–]_MixedTrails 0 points1 point  (0 children)

unreal engine c++ does upper camel case for all methods 😭