Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

setq is called a 'special form', which does not evaluate its args as other s-expr would.


setq would in fact evaluate its second argument (and bind it to the name specified by the 1st).

Picolisp has a special rule for (literal) lists starting with a (literal) number, they're implicitly quoted instead of the CAR being interpreted as a function:

> if the CAR of the list is a number, the whole list is returned as it is

This makes more sense considering a second quirk of Picolisp: numbers can be used as functions, in which case they're interpreted as a pointer to the executable code to run.

And from what I understand Picolisp's execution model doesn't have special forms as such, rather function definition specifies whether they receive their arguments evaluated or not.


It also has macros now, but they're rarely used.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: