witheve / Eve

Better tools for thought
http://witheve.com
Apache License 2.0
7.16k stars 257 forks source link

make index-of one indexed #864

Closed cmontella closed 7 years ago

joshuafcole commented 7 years ago

I'm the one who put the type coercion in there, but I haven't decided yet if that was the right move. It seems equally (or more?) valid to just bail if someone gives us a number as the text attribute, but since we don't have any way to convert from string to number or vice versa yet I threw that in. That said, adding eve/convert[value: "7" to: "number"] is not hard if we decide it's the right thing to do...

I don't know that we need to slay this dragon now, but it'll become more pressing in 0.4 or if we start accumulating a wide userbase.

joshuafcole commented 7 years ago

@cmontella You'll need to look at the editor and ui watchers as well, which both have a single use of index-of

cmontella commented 7 years ago

I think they are both fine. In each case, you're not using the return value for anything.