[1] https://github.com/reddit-archive/reddit1.0/blob/bb4fbdb5871...
[1] https://github.com/reddit-archive/reddit1.0/blob/bb4fbdb5871...
%assertion-failure doesn't look like an accessor.
http://clhs.lisp.se/Body/f_car_c.htm
car described as "accessor", not named %car. No public function in CL is named this way. In fact, the character % doesn't make an appearance at all:
http://www.lispworks.com/documentation/lw50/CLHS/Front/X_Per...
I've never named a function or macro %something in 18 years of Lisp.
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.
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.
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.