* Adam Kennedy via RT (bug-XML-Compile@rt.cpan.org) [080417 09:21]:
Show quoted text> Queue: XML-Compile
> Ticket <URL:
http://rt.cpan.org/Ticket/Display.html?id=35138 >
>
> Method names in CPAN modules are almost always done in with small_chars
> as well, the few modules that do use methodName are generally ports from
> Java.
I don't know. I cannot distinuish between methods and function whens
I grep. YAML, Data::Dumper, GetOpt::Long use a leading capital for
functions and methods.
The standard you suggest is not there, even not in core. I would like
it to exist, please make it happen. Discuss the official standard for
Perl5 on p5p. Once agreed upon, I will follow that standard in all new
modules I develop. Perl is a mess, and we have to live with it.
Or simpler: try to get this standard in the Perl6 design. We cannot easily
correct mistakes from the past, but may prevent them for the future.
Certainly, I would embrace this kind of increased quality for Perl. I'll
back you in the attempts.
Show quoted text> The best and most though documentation on naming conventions is Chapter
> 3 of Perl Best Practices, which covers this in depth.
Sorry, gave my own copy ways to new users, already twice... have none
at hand, at the moment. I have read it once (when it came out), so
probably I have read his opinion about the subject.
As far as I know, no-one has declared "Best Practices" the official
standard. Gladly, a lot of companies use it to have a start for a coding
standard based on that book. None so far got as far as declaring it
the official standard for internal use... or do you know any?
Last YAPC::EU, it was auctioned which page to rip out the book. For
400 euros, someone had Damian rip-out the first rule: where to put
the accolades. Another of these holy wars.
Show quoted text> It does not make a distinction between identifiers when used as
> variables, functions or methods, they all follow the same convention
> "Separate words with underscores".
Well, it is quite impractical. A lot of code mixes function calls
and method calls. It is a little bit harder to remember which one
of those should be called when you have no visual help from the name.
Real-life story: today I had a visit from a guy who I never met before,
and who does program perl a lot without being in touch with our core
community, who used the same function/method differentiation as I did
(and Java/JavaScript/C#/PHP/Python use). I am not alone!
Damian's/your suggestion, and applied by many -but far from all- core
modules, is shared by Ruby and C++.
Show quoted text> Apart from the camel-casing of the methodNames, the rest of the casing
> you have there matches current conventions.
... matches the conventions proposed in the book by Damian, is
probably what you mean.
XML::LibXML is my base module, and is using my convension for its library,
so it seems me best not to divert from that. This is the best reason not
to change the current notation.
--
Regards,
MarkOv
------------------------------------------------------------------------
Mark Overmeer MSc MARKOV Solutions
Mark@Overmeer.net solutions@overmeer.net
http://Mark.Overmeer.net http://solutions.overmeer.net