From: "Jesús Gabriel y Galán" Date: 2013-04-24T16:13:50+09:00 Subject: Re: BEGINNER -CLASS QUERY On Wed, Apr 24, 2013 at 12:29 AM, Ryan Davis wrote: > > On Apr 22, 2013, at 06:52 , Jesús Gabriel y Galán wrote: > >> On Mon, Apr 22, 2013 at 3:45 PM, shaik farooq wrote: >>> HEY as we know that the object conatins the instance variables that are >>> defined in the class >> >> In statically typed languages, you have to declare the types of >> variables. Instance variables are one example, and are defined in the >> class typically. > > This has nothing to do with static typing vs dynamic typing as it isn't a typing issue. Smalltalk is dynamically typed and you have to declare the instance variables for a class at class definition time. You don't declare the _types_, just the names. This makes ivar access in smalltalk much faster than ivar access in ruby (array offset vs hash lookup). > > > Sorry for the confusion. From my (obviously limited) knowledge of languages I thought that was a general rule. Let's change that then to "in Ruby, you don't declare variables...". Thanks for the correction. Jesus.