janet-lang / janet

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

Document `&keys` better. #1361

Closed amano-kenji closed 5 months ago

amano-kenji commented 5 months ago

Until recently, I didn't recognize the example for &keys on https://janet-lang.org/docs/functions.html was using destructuring. I thought destructuring was a mandatory syntax for &keys.

However, I realized that &keys doesn't require destructuring.

https://janet-lang.org/docs/functions.html should point out that destructuring after &keys is optional.

sogaiu commented 5 months ago

By "the example for &keys", are you referring to something in this section?

I don't quite follow what you're getting at, though possibly it's better to file an issue at the website repository rather than here.

If you do decide to file an issue there, may be you wouldn't mind elaborating a bit more on the specifics of what you mean.

amano-kenji commented 5 months ago

Okay.

amano-kenji commented 5 months ago

https://github.com/janet-lang/janet-lang.org/issues/205

sogaiu commented 5 months ago

Thanks!