[fpc-devel] Fix CamelCase in unit and method names
Paul Michell
Paul at MichellComputing.co.uk
Thu Mar 22 18:04:20 CET 2018
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!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20180322/bc9b7801/attachment.html>
More information about the fpc-devel
mailing list