Edit: ah, I think I understand. I don't mean to imply that all accessors should be named in this way. That would be gross.
Edit: ah, I think I understand. I don't mean to imply that all accessors should be named in this way. That would be gross.
So if we have a user-email function that is just an object slot accessor, We could have %user-email that actually does a database query. I can't remember for sure, but I wouldn't be surprised if I'd seen a double %%-prefix used, too.
You don't always want to put those functions in separate packages (traditionally in Lisp, packages are relatively heavyweight--e.g. an entire web server framework might have only one or two packages).
Another similar example might be the convention of defining a macro with the name my-macro, and a function that actually implements much of the macro, or is an equivalent of the macro that takes a thnk, that is named my-macro*.
(24 years of lisp here--I wouldn't be surprised if the conventions of mainstream lisp during the earliest six years were somewhat different than the following decades.)
Edited to add: Now that I think about it, this convention may have been heavily used in the Macintosh Common Lisp community.
It's quite fantastic to be schooled by old-time lispers (only 6 years of lisp here).
That's why I linked to some CCL code (descendant of MCL).
I use foo-impl and such for the implementation of foo.
If I have a my-macro, which is implemented by an expander function, then I call that function expand-my-macro.
In application code, this is just a smell.
To prevent clashes, there are packages.
What will you do if three or more modules want the same function name? Tack on %%, %%%, ...
> What will you do if three or more modules want the same function name? Tack on %%, %%%, ...
Certainly not!
I think your points are all very fair: it would be a smell, and is evidence of a need for improvements at a more structural level. It just smells a little less than a seemingly purposeful misspelling to my nose.