User types in snap! dev

I was messing around in the development version of Snap!, and I saw in the git history that…. Snap! 12 is bringing user defined types!

Open Snap! dev, import that block, and when you display it in either a block reporter bubble, a variable monitor, or speech bubble, and it will display a form of it in “(x, y)”! Of course, you need JS to create the morph or else it breaks (if you return a text), so it will be useful to support that conversion (maybe even costumes!). But you can access the fields perfectly fine and it just works!!! I’m so happy this is being added!! Of course, wait for Snap! 12 to be released before using this, but I sure can’t wait!

Yeah, but it is experimental…

Also I think it’ll be a nice thing for this if you were able to right-click the output and such to see the original list, for debugging purposes.

I thought my eyes were playing a trick on me :laughing:
I believe @mark4sisb and @blockpointstudios implemented this in vanilla snap among others already though.
EDIT: for me it just crashes snap, unless JS is on of course. hopefully we get a non-js version if this feature does make it into normal snap!

Yeah, but this new feature is in Snap! itself (faster, and doesn’t need a library). Its like my old OOP with graphics library!

so was the old one though?

yes, this is why I am excited.
Also, we’re getting VARIADIC MENUS!!!

Yeah!!! Now what I’m really craving is a easy slot group system..

EDIT: My projects where I used to have read only inputs that I switched to variadic ones (not read only) are now broken in dev :frowning:

don’t yet get all excited about this. Background: We’re currently working - somewhat in “emergency” mode - together with local organizations on several curriculum fronts, one for Germany and the other one for India, where each urgently requires kinda the exact opposite set of special language features. For German schools we need to seriously “dumb down” Snap! by taking out / hiding everything that’s not strictly imperative or too “computer-sciency”, whereas for India we need to add a bunch of special complex data types to be built-in, and, in turn, take out everything that’s not strictly functional or too “playful”, which incudes everything about sprites, costumes, media etc. Since we’re such a small team and time pressure is immense we simply try to cut corners whenever we can and let folks help us by enabling them to help us implement what they want in Snap itself. But this isn’t about elegance or expressive power at all, it’s simply self-defence. This is where both the new “tutorials” feature (for Germany) and the new ADT stuff (for India) is coming from.

Well… The ADTs will still be available for normal users, right?

yes, but they might be largely useless for you initially, because they’ll rely on special extensions for visualization. But we’ll get there eventually.

These features are really interesting, and so was your explanation. I did have a couple of questions.

nice!

when did this happen?

what is this?

i think it’s a new learning feature they’re adding for german classes (most likely will be available to everyone on release) where teachers can make tutorial projects for their students

There’s actually a topic about this

yeah, I have posted in the topic. I just don’t really know how to use it.

This isn’t anything new? I did the same exact thing in my Morphic reimplementation

right, but now it is fast and in normal snap.

Lists are normal snap?

What’s that?

As in, the “_morph” function is built in, and it comes with the benefit of just using it as a normal list but when visible, it becomes the representation.