command? and script? predicates Lassi Kortela (20 Apr 2020 07:40 UTC)
Re: command? and script? predicates Lassi Kortela (20 Apr 2020 07:48 UTC)
Re: command? and script? predicates John Cowan (20 Apr 2020 15:12 UTC)
Re: command? and script? predicates Lassi Kortela (20 Apr 2020 15:21 UTC)

Re: command? and script? predicates Lassi Kortela 20 Apr 2020 07:48 UTC

The Python idiom:

if __name__ == "__main__":
     ...

is most naturally written as:

(when (command-name)
   ...)

If we added a `command?` predicate, that would be:

(when (command?)
   ...)

However, it's probably better to use an explicit main procedure anyway.
IMHO that Python idiom is a hack.

I left `main` concerns out of this SRFI for now. Feel free to suggest
that they should be in scope.