Discuss Scratch

mybearworld
Scratcher
1000+ posts

Lists inside of lists

In python, you can do list inside lists.
#Example
example = [1,        #a normal item.
           [2,
            3,
            4],      #a list inside a list.
           [[5,
             6,
             7],
            8,
            9]       #a list inside of one of these!
           ]
In Scratch, this could look like this:

When you expand the 2nd element, it would look like this:

and when you fully expand the 3rd…


And the block inputs would look like

TechKid22
Scratcher
500+ posts

Lists inside of lists

How would this work? I haven`t studied that in Python yet.
mybearworld
Scratcher
1000+ posts

Lists inside of lists

TechKid22 wrote:

How would this work? I haven`t studied that in Python yet.
You could put list inside of lists, so blocks like
item (1) of [item 2 of example list v]
would work.
Ihatr
Scratcher
1000+ posts

Lists inside of lists

The Scratch Team has considered your idea, and rejected it for the following reason.
1.7 2D lists This block, and others, would allow you to create 2D lists to store information, sort of like a table. However, this is too complicated for what is supposed to be an introductory programming language. In addition, there are workarounds possible by using an ordinary list and an indexing function. For those who are interested, it may be worth checking out Snap!. It is a block-based programming language designed for more experienced programmers, and has more advanced data structures than Scratch does.
In the future, please read The Official List of Rejected Suggestions before posting. Quote from Ihatr's TOLORS quoter

I'm pretty sure this is rejected

Last edited by Ihatr (Nov. 21, 2020 20:04:35)

TechKid22
Scratcher
500+ posts

Lists inside of lists

Ihatr wrote:

The Scratch Team has considered your idea, and rejected it for the following reason.
1.7 2D lists This block, and others, would allow you to create 2D lists to store information, sort of like a table. However, this is too complicated for what is supposed to be an introductory programming language. In addition, there are workarounds possible by using an ordinary list and an indexing function. For those who are interested, it may be worth checking out Snap!. It is a block-based programming language designed for more experienced programmers, and has more advanced data structures than Scratch does.
In the future, please read The Official List of Rejected Suggestions before posting. Quote from Ihatr's TOLORS quoter

I'm pretty sure this is rejected
Thank you for helping out.
mybearworld
Scratcher
1000+ posts

Lists inside of lists

Ihatr wrote:

The Scratch Team has considered your idea, and rejected it for the following reason.
1.7 2D lists This block, and others, would allow you to create 2D lists to store information, sort of like a table. However, this is too complicated for what is supposed to be an introductory programming language. In addition, there are workarounds possible by using an ordinary list and an indexing function. For those who are interested, it may be worth checking out Snap!. It is a block-based programming language designed for more experienced programmers, and has more advanced data structures than Scratch does.
In the future, please read The Official List of Rejected Suggestions before posting. Quote from Ihatr's TOLORS quoter

I'm pretty sure this is rejected
I don't mean tables or 2d lists!
TechKid22
Scratcher
500+ posts

Lists inside of lists

Ihatr wrote:

The Scratch Team has considered your idea, and rejected it for the following reason.
1.7 2D lists This block, and others, would allow you to create 2D lists to store information, sort of like a table. However, this is too complicated for what is supposed to be an introductory programming language. In addition, there are workarounds possible by using an ordinary list and an indexing function. For those who are interested, it may be worth checking out Snap!. It is a block-based programming language designed for more experienced programmers, and has more advanced data structures than Scratch does.
In the future, please read The Official List of Rejected Suggestions before posting. Quote from Ihatr's TOLORS quoter

I'm pretty sure this is rejected
Nope, that`s not what he meant.
Zoomer_X
Scratcher
500+ posts

Lists inside of lists

TechKid22 wrote:

Ihatr wrote:

The Scratch Team has considered your idea, and rejected it for the following reason.
1.7 2D lists This block, and others, would allow you to create 2D lists to store information, sort of like a table. However, this is too complicated for what is supposed to be an introductory programming language. In addition, there are workarounds possible by using an ordinary list and an indexing function. For those who are interested, it may be worth checking out Snap!. It is a block-based programming language designed for more experienced programmers, and has more advanced data structures than Scratch does.
In the future, please read The Official List of Rejected Suggestions before posting. Quote from Ihatr's TOLORS quoter

I'm pretty sure this is rejected
Nope, that`s not what he meant.
This is rejected.
Ihatr
Scratcher
1000+ posts

Lists inside of lists

TechKid22 wrote:

Thank you for helping out.

TechKid22 wrote:

Nope, that`s not what he meant.
Make up your mind lol.

Anyway, this seems to be a form of storing mini lists inside an item of a list, or basically nesting a list in another, which is rejected
SquirreIstar
Scratcher
1000+ posts

Lists inside of lists

mybearworld wrote:

Ihatr wrote:

The Scratch Team has considered your idea, and rejected it for the following reason.
1.7 2D lists This block, and others, would allow you to create 2D lists to store information, sort of like a table. However, this is too complicated for what is supposed to be an introductory programming language. In addition, there are workarounds possible by using an ordinary list and an indexing function. For those who are interested, it may be worth checking out Snap!. It is a block-based programming language designed for more experienced programmers, and has more advanced data structures than Scratch does.
In the future, please read The Official List of Rejected Suggestions before posting. Quote from Ihatr's TOLORS quoter

I'm pretty sure this is rejected
I don't mean tables or 2d lists!
2D list just means a twofold list, which is a list inside of a list.
gosoccerboy5
Scratcher
1000+ posts

Lists inside of lists

Sorry. From what I know, lists aren't really first class. They actually report a string of all the items in it. I doubt Scratch is structured to handle this kind of thing. Also, rejected as ihatr said
mybearworld
Scratcher
1000+ posts

Lists inside of lists

gosoccerboy5 wrote:

Sorry. From what I know, lists aren't really first class. They actually report a string of all the items in it. I doubt Scratch is structured to handle this kind of thing. Also, rejected as ihatr said
In other programming languages they can do this too…

SquirreIstar wrote:

2D list just means a twofold list, which is a list inside of a list.
Whoa, really? I'll close this when the button gets here then..
Harakou
Scratcher
1000+ posts

Lists inside of lists

I think, from our perspective of trying to keep Scratch accessible, nested lists and 2D arrays/lists are functionally the same. While I personally would like to see multidimensional arrays in Scratch, the general consensus so far is that it's not in line with Scratch's design goals.

Powered by DjangoBB