Elektrine lite

← Feed

@pkw@snac.d34d.net

Post #2849142

2026-05-07 16:47 UTC

Because it is not functional ... Unspecified is pointing out the code smell of it. If it returned false then it is basically an "if". That's how i see it anyways. I also return '() sometimes. Especially in the scheme html lib i'm using. I kinda miss common-lisp's spinnerrett where IIRC a you can use a when/unless and it just "disappears" on the negative path. In scheme I HAVE to use "if" or else (no-pun) the unspecified explodes the html generator. But i still like it.

Replies (2)

  • @mousebot@todon.nl 2026-05-07 17:01

    @pkw yeah me too, but i dislike it. :) so the "functional" when, ie if-error, is like a guard clause. and the CL when, if-nil, is secretly an if. to me when always was the latter, im indifferent to if i have what my when asserts i have, my when structures a fallback situation. interesting distinction to learn for me

    Open ##2849143

  • @mousebot@todon.nl 2026-05-07 18:17

    @pkw just to conclude my FP tutorial in public, how is returning nil or false not functional? can't i say if we have nothing, gimme nothing. does it have to do with mutability somehow?

    Open ##2849150