Re: Names of `stringp`, `intp`, `floatp` …
Henrik Grubbström <[email protected]> Thu, 20 Mar 2025 20:08:37 +0100 (CET)
| Newsgroups | gmane.comp.lang.pike.user |
|---|---|
| Organization | Roxen Internet Software AB |
| Message-ID | <[email protected]> |
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-1206650414-1742497717=:20628 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT 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 --8323328-1206650414-1742497717=:20628--