In 9.0 “if” is now vardric with an “else if” I’ve noticed
How will this work with a list input? If at all
In 9.0 “if” is now vardric with an “else if” I’ve noticed
How will this work with a list input? If at all
You can't use input list for this block.
[edit] I wonder if multi-branched conditionals will be deprecated.
Did you get a preview of Snap 9? Is it publicly available yet?
Thx!
I guess the multi-branched conditional will no longer be necessary; neither will
, strictly speaking. However I believe that it's still useful to keep or introduce other varieties of multi-branched conditionals within the like-named library, if only to demonstrate how they can be constructed. E.g. I wrote a multi-branched version of the reporter IF () THEN () ELSE (), which I’d be happy to contribute.
Yeah, I guess. I regret its passing, only because it was a brilliant early example of how users could develop control structures in ways we hadn't anticipated.
my idea is that when you drop a block onto the arrows to make an input list, the block would change into something like this:
and a block could then be added to the second input.
(if neither of the input list slots have an input, then the block would revert back to its regular form.)
I don't think that's a good idea. It would probably confuse people if you have the conditions and the scripts in different places.
What about lists of lists?
Where the first item is the condition to call and the second is the script to run
that would work too, but it would be inconsistent with other blocks using input list.
This is probably the best way to do it though.
Here’s my proposal for a multi-branch version of .
It can handle (both unevaluated and other) input lists:
I propose to use a list of 2 unevaluated items (condition and reporter) for each case:
My function relies heavily upon:
Application example
With input list
… or with ordinary lists only (all predicates and reporters need to be explicitly ringified!):
This is very cool but sadly deprecated
What do you mean?
Because we have the block in the pallet when the update comes out it’s sort of redundant
Okay, thanks. I was confused by your use of the word "deprecated".
This is sort of off topic, but I wonder what the new definition of the “catch” and “throw” blocks as well as their friends
The reporter version of catch and the throw with inputs block.
With the discontinuation (see what I did there ) of the call and run blocks will be
Continuations haven't been removed; it's just that the notation for them has changed. The block can be used as a "context" for calling or running:
Remember that this is a dev version, and there may still be changes before the official release.
I knew that they weren’t removed
So the library is also gonna add a new block?
You mean CALL WITH CONTEXT? It seems to be built in, even though custom.