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

#1 2013-02-18 17:26:53

MrFlash67
Scratcher
Registered: 2012-08-08
Posts: 500+

Is Scratch OOP?

Is Scratch Object Oriented? Tell me if this would be more suitable for the AT's.


Who would win, SOPA or PIPA?

Offline

 

#2 2013-02-18 17:57:49

technoguyx
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: Is Scratch OOP?

It's not, because there are no classes to create objects from - you create objects directly instead, and therefore inheritance is not possible. But Scratch objects do have their own variables, therefore we could consider Scratch an object-based language which is not the same.

I've answered this in Spanishtongue

Last edited by technoguyx (2013-02-18 17:58:29)


http://getgnulinux.org/links/en/linuxliberated_4_78x116.png

Offline

 

#3 2013-02-18 19:47:26

MrFlash67
Scratcher
Registered: 2012-08-08
Posts: 500+

Re: Is Scratch OOP?

†hen what would you describe i† as? I will use † for T and t from now on!


Who would win, SOPA or PIPA?

Offline

 

#4 2013-02-18 20:30:13

kayybee
Scratcher
Registered: 2009-12-07
Posts: 1000+

Re: Is Scratch OOP?

technoguyx wrote:

It's not, because there are no classes to create objects from - you create objects directly instead, and therefore inheritance is not possible. But Scratch objects do have their own variables, therefore we could consider Scratch an object-based language which is not the same.

I've answered this in Spanishtongue

Aw... I always thought Scratch was POO!
tongue

^^^to the post above
Just saying, some computers/devices don't have the character you're using, so some people might not be able to read what you type. Also, it just looks silly.

Offline

 

#5 2013-02-19 08:30:03

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

Re: Is Scratch OOP?

technoguyx wrote:

It's not, because there are no classes to create objects from - you create objects directly instead, and therefore inheritance is not possible. But Scratch objects do have their own variables, therefore we could consider Scratch an object-based language which is not the same.

I've answered this in Spanishtongue

Sprites are instances of a generic sprite class, each with their own properties.
Also, though it doesn't count, blocks are created as instances of the block class.  tongue

However, Scratch internally IS OOP - you just can't program with it. But BYOB extends Scratch to program with OOP.

Offline

 

#6 2013-02-19 12:13:00

technoguyx
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: Is Scratch OOP?

^ Squeak Smalltalk is an OOP language, of course, but Scratch itself isn't.

See the fundamental features and concepts of OOP. Scratch objects lack local methods (though they can be emulated by broadcasts - but passing arguments gets really complicated this way) and inheritance.


http://getgnulinux.org/links/en/linuxliberated_4_78x116.png

Offline

 

#7 2013-02-19 12:26:09

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

Re: Is Scratch OOP?

You're still thinking about 1.4, aren't you? 2.0 does have both - procedures and cloning. So even if Scratch 1.4 wasn't 100% OOP, 2.0 is.

Offline

 

#8 2013-02-19 12:32:00

firedrake969_test
Scratcher
Registered: 2012-08-08
Posts: 500+

Re: Is Scratch OOP?

Still no classes.  Procedures can't create variables within them, so 2.0 isn't 100% either.


Alt of Firedrake969.

Offline

 

#9 2013-02-19 12:39:35

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

Re: Is Scratch OOP?

Sprites can act as classes or instances with cloning. Though what you said about function variables is true...

Offline

 

Board footer