develooper Front page | perl.perl5.porters | Postings from March 2022

Builtin functions: Should they be snake_case?

Thread Next
Paul "LeoNerd" Evans
March 4, 2022 15:37
Builtin functions: Should they be snake_case?
Message ID:
The first few functions I added to `builtin` were direct copies in
behaviour and name from the equivalents in Scalar::Util, or
newly-invented for the boolean feature. Among them are functions named
`isweak` and `isbool`. These names don't have underscores.

Core perl also seems to eschew the underscore, having many core
operators as direct copies of the same named system calls from POSIX or

There are recent suggestions of adding new `builtin` functions with
names like


I think therefore I'd like to suggest renaming the existing `isweak`
and `isbool` functions before people start using them, to `is_weak` and

What I'll probably do is rename them to having underscores in their
names anyway, but provide a wrapper alias in case people have started
writing code on those names. We can remove the wrapper at some later
time - because these are all "experimental" anyway and they're still
very new.

I'd also like to suggest that the naming scheme for new additions going
forward should be to use snake_case, even for such prefixes as "is_".

Thoughts anyone?

Paul "LeoNerd" Evans      |  |

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About