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

#1 2007-11-09 07:20:16

fritzi
Scratcher
Registered: 2007-11-06
Posts: 4

Make numbers to 1. Class scratch citizens.

Make numbers to 1. Class scratch citizens.

There is a nice OO –design for visual objects (sprites)-
But why did you break out and make Numbers a “special case"  (creation and displaying …)?
Wouldn’t’   it be nice  ( and OOD ) to supply a “Number sprite" , which ( additionally to other sprite’s functions) know to calculate?
This would honour the implementation language smalltalk - with its orthogonal design.

Here a mapping of functionality:

- Global “Number sprites" would be global objects and could be used like global variables.
- Local ( there must be a GUI to add members to a sprite) “Number sprites"  would be  local accessible  instance-variables
- “Number sprites"  could be dropped in  to numeric arguments.
- You no longer need the artificial “Numbers" -Tab in the Viewer
- Instead of   “Variables" we will have “Members" , which also will be Sprites. (Maybe invisible by default)


And the best of it – it is extendible.
Think of “String sprites" , “Collection (Stack, List etc.) sprites"  all these would fit in this design.

What do you think?


Fritz

Last edited by fritzi (2007-11-09 07:22:47)

Offline

 

#2 2007-11-09 11:06:45

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

Re: Make numbers to 1. Class scratch citizens.

The concept of objects getting messages is very smalltalk, but the term "sprite" comes from early game design.  It refers to a bitmap picture that can be moved around on the screen.  The usage in scratch is true to this definition, but what you are proposing is quite a different concept.

Smalltalk as a language has a number of interesting features, but it has not been able to gather much of a following in the last 25 years.  I think that a number of people find its approach to programming too foreign to their ways of thinking about things.  I'm glad that scratch stuck to the basics, which are common to many programming languages, rather than being another flavor of smalltalk.

Offline

 

Board footer