Re: [fpc-devel] Fix CamelCase in unit and method names
Mark Morgan Lloydschrieb am Do., 22. März 2018, 17:57: > On 22/03/18 15:30, Juha Manninen wrote: > > On Thu, Mar 22, 2018 at 3:15 PM, Denis Kozlov > wrote:> Please do... It has caused enough eye (OCD) stress over the years ;) > > +1Yes, it has bothered also me a lot. I use code completion to get > theunit names correctly. Most of them are CamelCase but some arelowercase. > The result looks sloppy. Maybe it is OCD, don't know. Itbothers me anyway. > > Is my understanding correct that there's no compiler warning for this > sort of inconsistency? > Of course there isn't. After all Pascal is case insensitive, so everyone is free to case the identifiers as they want. Regards, Sven > ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Request for applying patch #33124
On 22/03/18 16:14, Ondrej Pokorny wrote: Can somebody apply the patch at https://bugs.freepascal.org/view.php?id=33124 it's nothing serious, only a missing Cocoa header definition. Those headers have been generated automatically. They should never be manually patched. Updated versions are indeed needed, but that will probably take quite a bit of work. I don't even know where the latest version of the header conversion tool is hosted, or which OS headers are the latest version it works with. Jonas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Fix CamelCase in unit and method names
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
Re: [fpc-devel] Fix CamelCase in unit and method names
On 22/03/18 15:30, Juha Manninen wrote: On Thu, Mar 22, 2018 at 3:15 PM, Denis Kozlovwrote:> Please do... It has caused enough eye (OCD) stress over the years ;) +1Yes, it has bothered also me a lot. I use code completion to get theunit names correctly. Most of them are CamelCase but some arelowercase. The result looks sloppy. Maybe it is OCD, don't know. Itbothers me anyway. Is my understanding correct that there's no compiler warning for this sort of inconsistency? -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Fix CamelCase in unit and method names
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 glGenBuffers should remain the same gtk_window_new should remain the same dlopen should 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 arctan should be ArcTan getdir should 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 ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Fix CamelCase in unit and method names
On Thu, Mar 22, 2018 at 3:15 PM, Denis Kozlovwrote: > Please do... It has caused enough eye (OCD) stress over the years ;) +1 Yes, it has bothered also me a lot. I use code completion to get the unit names correctly. Most of them are CamelCase but some are lowercase. The result looks sloppy. Maybe it is OCD, don't know. It bothers me anyway. Juha ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
[fpc-devel] Request for applying patch #33124
Can somebody apply the patch at https://bugs.freepascal.org/view.php?id=33124 it's nothing serious, only a missing Cocoa header definition. Ondrej ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Fix CamelCase in unit and method names
On 22.03.2018 12:42, Michael Van Canneyt wrote: Code completion will benefit from it, I suppose. Yes, my only motivation is code completion. I uploaded the patch here: https://bugs.freepascal.org/view.php?id=33481 Thanks Ondrej ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Fix CamelCase in unit and method names
Please do... It has caused enough eye (OCD) stress over the years ;) Denis On 22/03/2018 11:32, Ondrej Pokorny wrote: Hello, will a patch be applied that fixes CamelCase in unit and method names and other identifiers? Example: dateutils -> DateUtils sysutils -> SysUtils typinfo -> TypInfo contnrs -> Contnrs strutils -> StrUtils EnterCriticalsection -> EnterCriticalSection DoneCriticalsection -> DoneCriticalSection LeaveCriticalsection -> LeaveCriticalSection TryEnterCriticalsection -> TryEnterCriticalSection (Funnily enough InitCriticalSection is correct.) TPoint.x -> TPoint.X TPoint.y -> TPoint.Y (For unit names: of course only the unit definition name will be changed, not the file name). Ondrej ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Fix CamelCase in unit and method names
On Thu, 22 Mar 2018, Tomas Hajny wrote: On Thu, March 22, 2018 12:42, Michael Van Canneyt wrote: On Thu, 22 Mar 2018, Ondrej Pokorny wrote: Hi, will a patch be applied that fixes CamelCase in unit and method names and other identifiers? Example: dateutils -> DateUtils sysutils -> SysUtils typinfo -> TypInfo contnrs -> Contnrs strutils -> StrUtils . . (For unit names: of course only the unit definition name will be changed, not the file name). At first sight I don't see any disadvantages from this, so yes, I would apply such a patch. IMHO preferably not the unit names (as in 'unit XxX') - with case sensitive file names on Unix, this change might increase time for searching the respective file (somewhat). Obviously, all further references of the unit (as in 'SysUtils.Execute') should be fine. But only if it is in a uses clause, not the actual unit xx; clause ? Michael. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Fix CamelCase in unit and method names
On Thu, March 22, 2018 12:42, Michael Van Canneyt wrote: > On Thu, 22 Mar 2018, Ondrej Pokorny wrote: Hi, >> will a patch be applied that fixes CamelCase in unit and method names >> and other identifiers? >> >> Example: >> >> dateutils -> DateUtils >> sysutils -> SysUtils >> typinfo -> TypInfo >> contnrs -> Contnrs >> strutils -> StrUtils . . >> (For unit names: of course only the unit definition name will be >> changed, not the file name). > > At first sight I don't see any disadvantages from this, so yes, I would > apply such a patch. IMHO preferably not the unit names (as in 'unit XxX') - with case sensitive file names on Unix, this change might increase time for searching the respective file (somewhat). Obviously, all further references of the unit (as in 'SysUtils.Execute') should be fine. Tomas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Fix CamelCase in unit and method names
On Thu, 22 Mar 2018, Ondrej Pokorny wrote: Hello, will a patch be applied that fixes CamelCase in unit and method names and other identifiers? Example: dateutils -> DateUtils sysutils -> SysUtils typinfo -> TypInfo contnrs -> Contnrs strutils -> StrUtils EnterCriticalsection -> EnterCriticalSection DoneCriticalsection -> DoneCriticalSection LeaveCriticalsection -> LeaveCriticalSection TryEnterCriticalsection -> TryEnterCriticalSection (Funnily enough InitCriticalSection is correct.) TPoint.x -> TPoint.X TPoint.y -> TPoint.Y (For unit names: of course only the unit definition name will be changed, not the file name). At first sight I don't see any disadvantages from this, so yes, I would apply such a patch. Code completion will benefit from it, I suppose. Michael. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
[fpc-devel] Fix CamelCase in unit and method names
Hello, will a patch be applied that fixes CamelCase in unit and method names and other identifiers? Example: dateutils -> DateUtils sysutils -> SysUtils typinfo -> TypInfo contnrs -> Contnrs strutils -> StrUtils EnterCriticalsection -> EnterCriticalSection DoneCriticalsection -> DoneCriticalSection LeaveCriticalsection -> LeaveCriticalSection TryEnterCriticalsection -> TryEnterCriticalSection (Funnily enough InitCriticalSection is correct.) TPoint.x -> TPoint.X TPoint.y -> TPoint.Y (For unit names: of course only the unit definition name will be changed, not the file name). Ondrej ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel