inrequires a stack slot copy while
bindjust modifies the first argument slot on stack, and re-use it as returned value. The incurred overhead exists because such copy boils down to an expensive
memcpy(), which could be replaced in a future (once we start working on optimizations) by a simple read/write using an SSE 128-bit wide register. Once such optimization is done, the difference should become insignificant.
bindmodifies context pointer in slot and returns it, while
inallocates an extra copy, so as to avoid modification of the original word (I guess?).
type: word!; probe type? type ; datatype! probe type? word! ; datatype! probe (type = word!); true switch type [ unset! [ print "unset!" ] word! string! file! url! block! [ print "word! string! file! url! block!" ] ]
any-type!has to do with that?
@lepinekong_twitter, at this stage in your Red career, if someone offers a hint, clue, or suggestion in answer to a question or problem you pose, please take some time to understand their response, rather than immediately saying "Why would I need to...?"
Do you understand the behavior now? If not, does this help?
type: word! blk: [ unset! [ print "unset!" ] word! string! file! url! block! [ print "word! string! file! url! block!" ] ] switch type blk find blk type type? type find blk type? type type? first blk find blk 'word! switch type reduce blk
There should be no more explanation needed than this, and is an example of how to go about learning and debugging on your own.