Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

empty? should be documented more clearly. #1383

Open
amano-kenji opened this issue Jan 31, 2024 · 2 comments
Open

empty? should be documented more clearly. #1383

amano-kenji opened this issue Jan 31, 2024 · 2 comments

Comments

@amano-kenji
Copy link
Contributor

repl:1:> (doc empty?)


    function
    boot.janet on line 117, column 1

    (empty? xs)

    Check if xs is empty.

What? Define empty. I thought nil was empty.

@kenaryn
Copy link

kenaryn commented Jan 31, 2024

nil is derived from latin nihil which approximately stands for "no thing". There is no thing (pun intended) like emptyness. Even the cosmic void is filled with reversed Kasimir force (formerly known as dark matter then more recently as dark energy).

I think the Janet doc means "Check if xs has a null valence ( from latin ne ullus, "not one") if I were to use array theory terminology.
I know Janet is not based on Array paradigm (unlike a language like Nial) so perhaps Check if xs has a zero dimensionality could be adopted in stead...

... or even "Check if xs has a null length".

@amano-kenji
Copy link
Contributor Author

Define xs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants