New operators block

so this block is a "use string independent comparisons" block, like

it is for use with the

is [] a [ v] :: operators boolean

and the
< [] = [] >

if the condition was true,
< ((1) + (0)) = (join (1) :: operators)? >

would return false
and so would
< is (join (0)::operators) a [text? v] ::operators >

but if the condition was false, those expressions would return true.

Yes, we should revisit comparisons. I want case-independent comparisons, which we have except in names of things (variables, blocks, etc.). You want a sensible treatment of strings of digits. If it were up to me, <is __ a [number] ?> and <is __ a [text string] ?> would both be true for numbers in either form. That's a hard sell because until now (almost) everything has a unique type, but I think it's the right thing. I don't think that should require being turned off and on; it's just the right thing. The fact that we don't quite handle numbers correctly is a bug, not a feature.

The trouble is, Jens complains every time we do anything different from JavaScript in dealing with types, because it requires adding tests (if/then/else) to the implementation, which slows it down. But since hyperblocks, Snap! is so amazingly fast that maybe I can convince him, supposing we ever have the time to do a serious big-picture design review.

ok, so do you think it would be possible?

What are hyperblocks?

stuff like this:
untitled script pic (1)
where, without hyperblocks, you would need to do this instead:
untitled script pic (1)

Someone who programms python will think that multiplying a list duplicates it.

well i find what snap does more useful than duplicating a list, since i don't know why anyone would want to duplicate all the items in a list


I don't know how to answer this without just repeating what I said before.

We take no responsibility for the bad design of other programming languages.

so you mean yes but @jens doesn't want to

Good grief.

We haven't yet had the discussion I think we should have, and so I don't know for sure what Jens will say when we do. But based on past similar conversations I don't think it'll be an easy question to settle.

yeah :smiley:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.