This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-03-19 09:53:08

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

First-Class Lists!

One of the most important features in BYOB is first-class lists, which means you can pass lists as arguments, nest them (inside other lists, to make advanced data-structures) and so on..
Imagine making a 'sort %list' block without first-class lists. How would you do that? You'll have to pass the name of a list to the block (using the drop-down) but - wait! How would you access it? of course you'll have to get the list as argument, but then it will confuse users between '%list as text' and '%list'. Bad idea.
I don't really think there's a reason not to do that. It's just making data-structures as binary-trees and dictionaries difficult and slow to implement, because you either have to make a couple of lists (which CLUTTERS up the interface) or invent some complicated math formula to access the right item when you need it.
It's also not that hard to understand that feature. I'm pretty sure even a 6 years old child could understand the idea behind having a list inside a list. So why not?

Offline

 

#2 2012-03-19 09:57:04

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: First-Class Lists!

Go for it, ST!

Offline

 

#3 2012-03-19 10:25:18

nickbrickmaster
Scratcher
Registered: 2010-02-02
Posts: 500+

Re: First-Class Lists!

Why don't we just make BYOB S2.0?


Ask me what I'm doing, wait an hour than roll a die, if it's 4-6, I'm playing Skyrim, if it's 1, I'm eating, if it's 2-3 I'm programming.
Steam: nickbrickmaster | RotMG: PwnThemAll | Minecraft: nickbrickmaster | League Of Legends: BaneOfTitans

Offline

 

#4 2012-03-19 10:46:28

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: First-Class Lists!

nickbrickmaster wrote:

Why don't we just make BYOB S2.0?

Why not?  tongue

Offline

 

#5 2012-03-19 11:40:51

Luke121
Scratcher
Registered: 2008-07-14
Posts: 1000+

Re: First-Class Lists!

Lists in yo lists?
http://www.cfgmodding.com/images/yodawg.jpg


http://bit.ly/IlVuB5
Sorry PF, too lazy to make my own!  tongue

Offline

 

#6 2012-03-19 13:17:16

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: First-Class Lists!

support!


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

Board footer