On 22/03/18 15:53, Anthony Walter wrote:
Yes, I agree, both for unit names, but also for methods and arguments.
The exceptions should be for code related that are imports or
extensions of existing APIs, for example:
cairo_create should remain the same
glGenBuffersshould remain the same
gtk_window_newshould remain the same
dlopenshould remain the same
But in the RTL or LCL here are some of many pure pascal functions or
procedures that could have their case changed:
abs should be Abs
arctanshould be ArcTan
getdirshould be GetDir
intpower should be IntPower
hexstr should be HexStr
strcan should be StrScan
And with RTL or LCL unit names:
keyboard should be Keyboard
math should be Math
strutils should be StrUtils
cthreads should be CThreads
Same applies to function/procedure/method arguments. If they're a pure
pascal original, then arguments should be CamelCase. If they are part
of an API imported, then they should remain the way the original API
declares them.
IMO
I agree, pure Pascal should use CamelCase, otherwise we should follow
the published API. In all cases usage should follow the declaration.
I must have the same OCD variant too!
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel