Re: Names of `stringp`, `intp`, `floatp`…

2025-04-05 Thread Lance Dillon
It is originally from lisp, it means predicate, designates testing for 
conditions.

https://www.geeksforgeeks.org/predicates-in-lisp/







On Thursday, March 20, 2025 at 02:25:23 PM EDT, Marcos Cruz 
 wrote: 






Just out of curiosity, what does the "p" means in `stringp`, `intp`,
`floatp`, `functionp`, `objectp`, `arrayp`…?

When I found those useful functions by the first time, I wondered why
they were not called, say, `is_string`, `is_int`, `is_float`,
`is_array`…?

-- 
Marcos Cruz
http://programandala.net



Re: Names of `stringp`, `intp`, `floatp`…

2025-03-20 Thread Fredrik Hubinette
I'm afraid it goes back even further than that. intp, stringp, etc. were
already present in the lpmud drivers when I started playing LPMUDs in 1991.
Since github wasn't a thing back then, finding out when it was actually
added turns out to be somewhat difficult.

 /Hubbe




On Thu, Mar 20, 2025 at 12:08 PM Henrik Grubbström  wrote:

> On Thu, 20 Mar 2025, Marcos Cruz wrote:
>
> > Just out of curiosity, what does the "p" means in `stringp`, `intp`,
> > `floatp`, `functionp`, `objectp`, `arrayp`…?
>
> The "p" is an abreviation of "predicate", and has been inherited from
> LISP and Scheme, which have predicate functions such as eg `integerp`,
> `floatp` and `consp`.
>
> > When I found those useful functions by the first time, I wondered why
> > they were not called, say, `is_string`, `is_int`, `is_float`,
> > `is_array`…?
>
> The LISP naming convention was the common naming convention at the time
> of LPC4 and μLPC.
>
> /grubba
>
> --
> Henrik Grubbström   [email protected]
> Roxen Internet Software AB


Re: Names of `stringp`, `intp`, `floatp`…

2025-03-20 Thread Henrik Grubbström

On Thu, 20 Mar 2025, Marcos Cruz wrote:


Just out of curiosity, what does the "p" means in `stringp`, `intp`,
`floatp`, `functionp`, `objectp`, `arrayp`…?


The "p" is an abreviation of "predicate", and has been inherited from
LISP and Scheme, which have predicate functions such as eg `integerp`,
`floatp` and `consp`.


When I found those useful functions by the first time, I wondered why
they were not called, say, `is_string`, `is_int`, `is_float`,
`is_array`…?


The LISP naming convention was the common naming convention at the time
of LPC4 and μLPC.

/grubba

--
Henrik Grubbström   [email protected]
Roxen Internet Software AB