You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I recently picked up Janet and I came across this usage in junk-drawer which is currently throwing a compile error on 1.32.1 with: compile error: unknown symbol new-elapsed.
So I have bisected this change to Janet version 1.27.0, but I think the new behavior is the correct behavior. The bindings inside if-let are short-circuiting, meaning that in the false case, it is possible that some of the bindings do not have values at all. While we could initialize things to nil, that doesn't sit right with me.
The above code makes sense since new-elapsed will always be truthy, but really should be written:
Ya letting the false branch of the if-let use variables defined could definitely lead to some confusing code 😆, since you don't necessarily know which definition in the let was false.
Hopefully I did depend on the old behavior anywhere else, otherwise I'll be kicking myself
Hello, I recently picked up Janet and I came across this usage in junk-drawer which is currently throwing a compile error on
1.32.1
with:compile error: unknown symbol new-elapsed
.There's nothing in the documentation about this, so I'm wondering if this is the intended behavior?
The text was updated successfully, but these errors were encountered: