janet-lang / janet

A dynamic language and bytecode vm
https://janet-lang.org
MIT License
3.43k stars 221 forks source link

add :unless modifier to (doc loop) #1296

Closed Andriamanitra closed 11 months ago

Andriamanitra commented 11 months ago

:unless was added in 1.31.0 (#1289) but never documented

sogaiu commented 11 months ago

On a side note, there appears to be docstring content (here and elsewhere) where there are phrases such as:

In this particular docstring, there appear to be a mix (e.g. true and truthy).

Do we want to be using truthy and falsey in some of these cases where true and false are being used?

bakpakin commented 11 months ago

truthy/falsey is more precise here since any non-nil, non-false value will behave as true, and nil will work as false (like most conditions).

Andriamanitra commented 11 months ago

truthy/falsey is more precise here since any non-nil, non-false value will behave as true, and nil will work as false (like most conditions).

That's a good point – I changed both when and unless to say truthy/falsey.