Yes- edited
I definitely agree. Also the LET should have multiple variable support.
Agreed. This should be in Snap!
My feeling is that if we have it at all, it shouldn't be hidden.
As for multiple variables, that's a big ask because it requires variadic upvars. And to do it right, it requires variadic input groups, so we can have
I don't think we'd go for two separate variadic inputs, one for upvars and one for values.
Anyway, for sure not in v7; we'll think about this for later.
So the text inputs just automatically update with the upvars?
Edit: I like that idea.
The whole point of the LET syntax is to put each name next to its value, so you don't have to look back and forth, and run the risk of miscounting. Otherwise you could just say
with the rest of the code inside the lambda.
Hmm. Maybe, although it introduces one more notation for people to learn.
Even
Declaration at first use
Cool. On my "someday" list.
You actually have a "to add someday" list?
Very nice
One suggestion ....
I think it's more the Snap! way to use words rather than symbols
Just great minds thinking alike
Yes. Mind you, there's no guarantee that Jens will agree to anything on the list, let alone everything! It used to just be a "features I want" list, but there's been a flurry of forum feature requests (that I like) recently so I (just yesterday) added a "from the forum" category within it.
The trouble with BE is that that block can be used by itself, setting and using a script variable all at once, and in that context, without "let," BE sounds weird. So I'm afraid it has to be ←, which everyone understands to mean assignment.
Good point - so something like
It was primarily intended as a part of blocks resembling some useful JS construct:
Object literal px = {r:255, g:0, b:0, a:100}
Destruct/spread [r,g,b,a] = ...px
BTW: with the "Variables" library and slight parameters tinkering it can work without external variables declaration.
I think the dardoro LET block and orange assignment block make a fine library and don't need JS or anything. On my list.
Edit: I mean my short list, hopefully pre-v7.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.