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

#1 2007-05-30 21:31:04

rauscher
Scratcher
Registered: 2007-05-30
Posts: 16

Arrays

As far as I'm concerned, the lack of arrays is the biggest limiting factor.  I recall that I could pretty much do anything with Extended Basic on my TI-99/4A -- and the only thing that system had over Scratch is arrays.

Sidenote:  Scratch reminds me of Atari 2600 "Basic Programming" a little.  Anyone else see the simularities?

Rich Rauscher

Offline

 

#2 2007-05-30 23:54:54

PatternsOfChaos
Scratcher
Registered: 2007-05-25
Posts: 13

Re: Arrays

Make the arrays a little more flexible, so that you can use them as a hash table, and there isn't anything you can't do.

At least, that's what's been said....  wink

Offline

 

#3 2007-05-31 00:12:50

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Arrays

Hashes (associative arrays) are a more general construct than arrays, though somewhat slower.  For a programming language like scratch, it may be better to include hashes than to include arrays, since you don't have to worry about the bounds of the array and you can index by floating-point numbers, strings, sprites, costumes, ...

Offline

 

#4 2007-05-31 14:36:50

jsimone
Scratcher
Registered: 2007-05-20
Posts: 28

Re: Arrays

Hashes would be most welcome!

Whatever advanced functionality is included in a future version, it should go into a "Advanced" blocks section so it does not intimidate novice users.

I would think the middle schoolers could easily handled the "concept" of associative arrays.

Offline

 

#5 2007-05-31 18:24:14

LodiJoe
Scratcher
Registered: 2007-05-16
Posts: 4

Re: Arrays

I like your idea of an advanced blocks section.  I would like to see Scratch evolve into allowing a string to be put into a variable, have an on-screen text field for display,  and be able to import a text file into an array or the variable.  With the high intelligence of the people who have developed Scratch, I can see no reason to stop Scratch at the level of teaching beginning programming.  It is actually ahead of the curve already because it is cross platform and makes a web page.

Offline

 

#6 2007-06-01 19:52:20

wjcarpenter
Scratcher
Registered: 2007-05-29
Posts: 5

Re: Arrays

jsimone wrote:

Whatever advanced functionality is included in a future version, it should go into a "Advanced" blocks section so it does not intimidate novice users.

Heh!  If you had asked me before I looked at Scratch if that same audience could handle a multi-threaded, event-driven, message-passing environment, I'd've said "no way, put them in an advanced section".  But here we have Scratch with those things in it.  Go figure.

Offline

 

#7 2007-07-24 14:59:43

clintp
Scratcher
Registered: 2007-07-24
Posts: 2

Re: Arrays

Array and Hashes are both pretty easy concepts to teach kids.

The "mailbox" analogy works well for arrays.  There are numbered slots and they're either empty or filled with a value.  [If you implement them as hashes, then scaling isn't an issue and the programmer can make as many mailboxes as they want starting at 0, 1, or any other index and count by 1's, 10's, or whatever.  No "dimensioning" or any of that *.]

Without getting fancy, a slot's default value is 0 unless it's been set to some other value.  Testing doesn't create slots, but setting them does.

Hashes I usually explain as dictionaries with a key/value pair.  It's almost never searched sequentially (but can be) and new entires can be written between other entries easily.  The concept is simple enough, but I'm not sure how (or why) you'd implement them in Scratch without full string support.

I do hope you implement arrays though.  There's a lot to be learned from a simple array type.

Offline

 

Board footer