So I was playing around in Snap! dev mode (because I felt like it), and I saw this block:
This looks so useful, but its not in there by default (even though it works without dev mode). Can someone like... add it in? I remember when I made a giant bock for this person with just using the block, which was very long and annoying to make.
Because say, if you input the number "5", you might be thinking of it as a text. To someone new, it might be confusing to debug.
I can't think of a reason to use it - all my use cases result in something like < (type of (thing)) = [number] @<:> > . I'll be glad to here what you think!
Translation translation translation. This is, I think, the most likely reason. The "type of [ ]" block always reports in English (it has to to avoid breaking programs when switching languages). Ever notice how the ([type V] of block (()@>) always reports a number (which corresponds to the block shapes)? This is because of translation.
One use I can think using it is making sure all values in a list are the same type (they can be any type but every one of them have to be same) like a list of 1, 2 and 3, a list of "foo", "bar", and "baz", etc, etc. I know I was trying to check the type for a reason when I used it. Otherwise I take back that useful statement.
Ah, good point: <(type of (a)) = (type of (b)) @<:> > is a lot easier than <<<is (a) a [number V]?> and <is (b) a [number V]?>>or <<is (a) a [text V]?> and <is (b) a [text V]?>> or <... :: rgb(255,0,0)> @<:>. However, that still poses the issue of:
Oh, I just realized that the "is a text?" block reports false for a number. I take it back.