Programming Languages Based on Smalltalk: A Comprehensive Report
VerifiedAdded on 2020/05/16
|16
|5511
|41
Report
AI Summary
This report provides a comprehensive overview of the Smalltalk programming language, a unique and influential object-oriented language. It begins with an executive summary and table of contents, followed by an introduction that highlights Smalltalk's historical significance and its impact on subsequent languages like C++ and Java. The report delves into the language's development, tracing its origins at Xerox PARC and the contributions of key figures like Alan Kay, Adele Goldberg, and Dan Ingalls. It discusses the evolution of Smalltalk through various versions (Smalltalk-72, Smalltalk-76, and Smalltalk-80) and its adoption of object-oriented concepts. The report also explores the language's domain, category, motivation, and intended use, including its role in rapid prototyping, agile methods, and GUI development. A detailed language overview covers implementation methods, features such as object-oriented programming, execution semantics, and UI frameworks, and provides sample programming codes. The report also includes a language evaluation, discussing basic OOP concepts, object models, and message-sending syntax. Finally, the report concludes with an assessment of the language's suitability for programmers.

Running head: PROGRAMMING LANGUAGES BASED ON SMALLTALK
PROGRAMMING LANGUAGE
Programming languages based on Smalltalk programming language
Name of the student
Student Id and Assessment Id
Name of the University
Author Note
PROGRAMMING LANGUAGE
Programming languages based on Smalltalk programming language
Name of the student
Student Id and Assessment Id
Name of the University
Author Note
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

1
PROGRAMMING LANGUAGES BASED ON SMALLTALK PROGRAMMING
LANGUAGE
Executive summary
This report consists of a discussion about the Smalltalk programming language. The chosen
country is Canada. This report also consists of the discussion about the development of the
language and the reason for its development. The report also consists of an overview of the
language that will be used to better understand about the concepts associated. Moreover, this
report presents a language evaluation which shows the processes that are used and the syntax that
are followed. Lastly, this report includes an assessment of the language such that it can be
adopted for use by programmers.
PROGRAMMING LANGUAGES BASED ON SMALLTALK PROGRAMMING
LANGUAGE
Executive summary
This report consists of a discussion about the Smalltalk programming language. The chosen
country is Canada. This report also consists of the discussion about the development of the
language and the reason for its development. The report also consists of an overview of the
language that will be used to better understand about the concepts associated. Moreover, this
report presents a language evaluation which shows the processes that are used and the syntax that
are followed. Lastly, this report includes an assessment of the language such that it can be
adopted for use by programmers.

2
PROGRAMMING LANGUAGES BASED ON SMALLTALK PROGRAMMING
LANGUAGE
Table of Contents
Introduction......................................................................................................................................3
Language development....................................................................................................................3
Developer/Designer.....................................................................................................................3
Time period..................................................................................................................................3
Domain and category...................................................................................................................3
Motivation and Intended use.......................................................................................................4
Language overview..........................................................................................................................4
Implementation method...............................................................................................................4
Features of the language..............................................................................................................5
Sample programming codes depicting the features of Smalltalk................................................6
Style of the language...................................................................................................................8
Language Evaluation.......................................................................................................................8
Basic OOP concepts and terminology.........................................................................................8
Object model................................................................................................................................9
Message sending syntax..............................................................................................................9
Smalltalk syntax.........................................................................................................................12
Language assessment.....................................................................................................................12
Conclusion.....................................................................................................................................13
References......................................................................................................................................14
PROGRAMMING LANGUAGES BASED ON SMALLTALK PROGRAMMING
LANGUAGE
Table of Contents
Introduction......................................................................................................................................3
Language development....................................................................................................................3
Developer/Designer.....................................................................................................................3
Time period..................................................................................................................................3
Domain and category...................................................................................................................3
Motivation and Intended use.......................................................................................................4
Language overview..........................................................................................................................4
Implementation method...............................................................................................................4
Features of the language..............................................................................................................5
Sample programming codes depicting the features of Smalltalk................................................6
Style of the language...................................................................................................................8
Language Evaluation.......................................................................................................................8
Basic OOP concepts and terminology.........................................................................................8
Object model................................................................................................................................9
Message sending syntax..............................................................................................................9
Smalltalk syntax.........................................................................................................................12
Language assessment.....................................................................................................................12
Conclusion.....................................................................................................................................13
References......................................................................................................................................14
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

3
PROGRAMMING LANGUAGES BASED ON SMALLTALK PROGRAMMING
LANGUAGE
Introduction
Smalltalk programming language is considered to be a very unique language which is to
be considered by programmers. This report discusses about the programming language known as
Smalltalk and also discusses about the key aspects and concepts which are also included in
Smalltalk. The history of Smalltalk involves the inclusion of the first embodied object orientation
in languages. Before the discovery of it, there were other types of languages like Clu and Simula.
The use of Smalltalk led to the use of various object oriented concepts like object, class,
message, method and inheritance. This led to the discovery of more modern languages like C++
and Java.
This report also includes a general discussion of the concepts of the language. The
concepts of language development are also discussed in this paper. Moreover, the overview of
the language and the evaluation of the language have been shown in this report. Lastly, this
report also discusses an assessment of the language.
Language development
This section of the report discusses about the development of the language and its
relevant topics.
Developer/Designer
There is much amount of Smalltalk language variants. The first version of the language
was made in the year 1980. The first version of the language was made due to the research
adopted by Alan Kay at the Xerox Palo Alto Research Center (PARC). In addition, Adele
Goldberg was responsible for documenting them and Dan Ingalls was responsible for
implementing the early versions of the language (Coupland, 2014). Furthermore, a similar
variant of the language known as the Smalltalk-72 was made which introduced the use of Actor
model. However, the syntax and the model of execution were considered to be different than the
modern versions of the language.
Time period
After applying various revision, the Smalltalk-76 was introduced which froze some of the
application semantics. The system also included a development environment which consisted of
the modern tools used along with class library code editor (Bracha & Ungar, 2015). Moreover,
for adding the purpose of object-oriented programming, the Smalltalk-80 added the concept of
metaclasses. This helped in associating behaviors and properties with various individual classes
along with the primitive values as well for creating instances.
The first variant of the language was the first version of Smalltalk-80. It was given for
peer review to various firms and Universities as well. After a certain period of time, the second
version of the same variant was released this was supposed to be platform-independent (Callaú et
al., 2013). It also included a virtual machine implementation of the language. After the year
1998, the ANSI Smalltalk has been the reference programming language for this case.
PROGRAMMING LANGUAGES BASED ON SMALLTALK PROGRAMMING
LANGUAGE
Introduction
Smalltalk programming language is considered to be a very unique language which is to
be considered by programmers. This report discusses about the programming language known as
Smalltalk and also discusses about the key aspects and concepts which are also included in
Smalltalk. The history of Smalltalk involves the inclusion of the first embodied object orientation
in languages. Before the discovery of it, there were other types of languages like Clu and Simula.
The use of Smalltalk led to the use of various object oriented concepts like object, class,
message, method and inheritance. This led to the discovery of more modern languages like C++
and Java.
This report also includes a general discussion of the concepts of the language. The
concepts of language development are also discussed in this paper. Moreover, the overview of
the language and the evaluation of the language have been shown in this report. Lastly, this
report also discusses an assessment of the language.
Language development
This section of the report discusses about the development of the language and its
relevant topics.
Developer/Designer
There is much amount of Smalltalk language variants. The first version of the language
was made in the year 1980. The first version of the language was made due to the research
adopted by Alan Kay at the Xerox Palo Alto Research Center (PARC). In addition, Adele
Goldberg was responsible for documenting them and Dan Ingalls was responsible for
implementing the early versions of the language (Coupland, 2014). Furthermore, a similar
variant of the language known as the Smalltalk-72 was made which introduced the use of Actor
model. However, the syntax and the model of execution were considered to be different than the
modern versions of the language.
Time period
After applying various revision, the Smalltalk-76 was introduced which froze some of the
application semantics. The system also included a development environment which consisted of
the modern tools used along with class library code editor (Bracha & Ungar, 2015). Moreover,
for adding the purpose of object-oriented programming, the Smalltalk-80 added the concept of
metaclasses. This helped in associating behaviors and properties with various individual classes
along with the primitive values as well for creating instances.
The first variant of the language was the first version of Smalltalk-80. It was given for
peer review to various firms and Universities as well. After a certain period of time, the second
version of the same variant was released this was supposed to be platform-independent (Callaú et
al., 2013). It also included a virtual machine implementation of the language. After the year
1998, the ANSI Smalltalk has been the reference programming language for this case.
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

4
PROGRAMMING LANGUAGES BASED ON SMALLTALK PROGRAMMING
LANGUAGE
Domain and category
The Smalltalk programming language was made by utilizing the Simula concepts. It is
also considered as one of the most influential object oriented programming languages. The
concept of Smalltalk helped to introduce the various programming languages like Objective-C,
Java, CLOS and Python (Allende et al., 2014). The main category of rapid and iterative
environment was utilized by the Smalltalk programming language. Along with this, Smalltalk
programming language was also considered to be associated with rapid prototyping, agile
methods and software pattern prototyping.
The Smalltalk-80 programming language consists of various components. The
functionalities that are included in a computer system are usually considered in the Smalltalk
programming language (Fabry & Galdames, 2014). This includes file system management,
automation in storage management, display handling, keyboard and pointing device input, text
and picture editing, debugger, performance spy, compiler and processor scheduling.
Motivation and Intended use
In the modern world of the computing environment, the Smalltalk programming language
has emerged from the ARPA funded research (Nistor et al., 2013). Using the environment of the
Smalltalk programming language, working prototypes of various sub-factors like the GUSs,
hypertext, mouse, tele-presence and the multimedia have been developed. This has been
developed in the year 1960.
The environment of Smalltalk programming language was considered to be the first to
develop the design patterns of software languages. The most popular one among these is the
Model–view–controller pattern which is used for designing the user interface (Mernik, 2013).
The pattern of this controller is used to get multiple views of the underlying data and is
considered to be efficient for software development methods involving various views. In
addition, the development of computer games can also be made utilizing the Smalltalk
programming language.
Furthermore, the Smalltalk programming language was also influential in the discovery
of the GUI interface (Graphical User Interface) and the What You See Is What You
Get (WYSIWYG) interface. In addition, it was also influential in developing font editors and
desktop metaphors for designing of the UI (Jones & Noble, 2014). For considering the
development of integrated development environment, the Smalltalk programming language was
considered to be effective due to the presence of the built-in debugging and the object inspection
tools. This led to the discovery of the Lisp Machine environment.
Language overview
This section of the report discusses about the overview of the Smalltalk programming
language.
Implementation method
The implementation of the Smalltalk programming language includes using the object
oriented programming aspects. In a similar manner, an object is used to represent a component of
PROGRAMMING LANGUAGES BASED ON SMALLTALK PROGRAMMING
LANGUAGE
Domain and category
The Smalltalk programming language was made by utilizing the Simula concepts. It is
also considered as one of the most influential object oriented programming languages. The
concept of Smalltalk helped to introduce the various programming languages like Objective-C,
Java, CLOS and Python (Allende et al., 2014). The main category of rapid and iterative
environment was utilized by the Smalltalk programming language. Along with this, Smalltalk
programming language was also considered to be associated with rapid prototyping, agile
methods and software pattern prototyping.
The Smalltalk-80 programming language consists of various components. The
functionalities that are included in a computer system are usually considered in the Smalltalk
programming language (Fabry & Galdames, 2014). This includes file system management,
automation in storage management, display handling, keyboard and pointing device input, text
and picture editing, debugger, performance spy, compiler and processor scheduling.
Motivation and Intended use
In the modern world of the computing environment, the Smalltalk programming language
has emerged from the ARPA funded research (Nistor et al., 2013). Using the environment of the
Smalltalk programming language, working prototypes of various sub-factors like the GUSs,
hypertext, mouse, tele-presence and the multimedia have been developed. This has been
developed in the year 1960.
The environment of Smalltalk programming language was considered to be the first to
develop the design patterns of software languages. The most popular one among these is the
Model–view–controller pattern which is used for designing the user interface (Mernik, 2013).
The pattern of this controller is used to get multiple views of the underlying data and is
considered to be efficient for software development methods involving various views. In
addition, the development of computer games can also be made utilizing the Smalltalk
programming language.
Furthermore, the Smalltalk programming language was also influential in the discovery
of the GUI interface (Graphical User Interface) and the What You See Is What You
Get (WYSIWYG) interface. In addition, it was also influential in developing font editors and
desktop metaphors for designing of the UI (Jones & Noble, 2014). For considering the
development of integrated development environment, the Smalltalk programming language was
considered to be effective due to the presence of the built-in debugging and the object inspection
tools. This led to the discovery of the Lisp Machine environment.
Language overview
This section of the report discusses about the overview of the Smalltalk programming
language.
Implementation method
The implementation of the Smalltalk programming language includes using the object
oriented programming aspects. In a similar manner, an object is used to represent a component of

5
PROGRAMMING LANGUAGES BASED ON SMALLTALK PROGRAMMING
LANGUAGE
it. These include characters, numbers, dictionaries, queues, file directories, text editors,
compilers, programs, computations and financial histories (Dennis, Wixom & Tegarden, 2015).
It consists of an operation set and private memory. The type of the object is used to determine
the nature of the process. For example, the objects which denote numbers are used to specify
arithmetic functions. In a similar manner, the objects which denote characters or string
operations can be used to denote character or string related operations. The code that is used to
perform the tasks are considered as messages. For example, the objects that represent numbers
can be sent messages for performing any arithmetic functions (Zeigler, 2014). Similarly, the
receiver which performs the task also receives the message. The process of computing is denoted
as an intrinsic ability of objects that can be invoked by transmitting of messages. The object
responds to them by creating interface. The interface is termed as the only way to communicate
with an object.
In the Smalltalk programming language, an object can be utilized for doing three various
things. These are holding the state which can be used to reference to other objects, receive
messages from it or any other objects and send message to itself or other objects. Similarly, in
the Smalltalk programming language, the primitive data types like boolean, integer or characters
are also termed as objects (Miranda & Béra, 2016). This is normally denoted when they are
termed as instances of a class and they are being invoked by any operations. This report includes
a discussion of the data types which is listed below.
7 "a number"
$z "a character"
'colourless ideas sleep furiously' "a string"
#(#tom #dick #harry) "an array of 3 components"
#(# one 'should shower at least' 3 'times a week')
This line of codes shows different data types and variables. The texts which are under
quotes are termed as comments and these will not be executed in the compiler. # before any
string is used to define a symbol. Moreover, an array is made by denoting the variables in the
format depicted above.
Due to licensing problems, the original system of the Smalltalk-80 was termed as
expensive which was accountable for its unavailability to the community (Felgentreff et al.,
2016). It was only available for universities and research works but lacked the ability to be used
by commoners. Due to this, the developers of the Smalltalk programming language grouped
together to form a portable and efficient virtual machine. This is termed as Squeak and is also
considered as public domain software. This made it very easy to run programs using Squeak
language and thus, the utilization of the Smalltalk programming language was achieved by
mostly all low to large size programmers. A sample program using the Smalltalk programming
language is depicted below:
Transcript show: 'Hello, World!'; cr.
PROGRAMMING LANGUAGES BASED ON SMALLTALK PROGRAMMING
LANGUAGE
it. These include characters, numbers, dictionaries, queues, file directories, text editors,
compilers, programs, computations and financial histories (Dennis, Wixom & Tegarden, 2015).
It consists of an operation set and private memory. The type of the object is used to determine
the nature of the process. For example, the objects which denote numbers are used to specify
arithmetic functions. In a similar manner, the objects which denote characters or string
operations can be used to denote character or string related operations. The code that is used to
perform the tasks are considered as messages. For example, the objects that represent numbers
can be sent messages for performing any arithmetic functions (Zeigler, 2014). Similarly, the
receiver which performs the task also receives the message. The process of computing is denoted
as an intrinsic ability of objects that can be invoked by transmitting of messages. The object
responds to them by creating interface. The interface is termed as the only way to communicate
with an object.
In the Smalltalk programming language, an object can be utilized for doing three various
things. These are holding the state which can be used to reference to other objects, receive
messages from it or any other objects and send message to itself or other objects. Similarly, in
the Smalltalk programming language, the primitive data types like boolean, integer or characters
are also termed as objects (Miranda & Béra, 2016). This is normally denoted when they are
termed as instances of a class and they are being invoked by any operations. This report includes
a discussion of the data types which is listed below.
7 "a number"
$z "a character"
'colourless ideas sleep furiously' "a string"
#(#tom #dick #harry) "an array of 3 components"
#(# one 'should shower at least' 3 'times a week')
This line of codes shows different data types and variables. The texts which are under
quotes are termed as comments and these will not be executed in the compiler. # before any
string is used to define a symbol. Moreover, an array is made by denoting the variables in the
format depicted above.
Due to licensing problems, the original system of the Smalltalk-80 was termed as
expensive which was accountable for its unavailability to the community (Felgentreff et al.,
2016). It was only available for universities and research works but lacked the ability to be used
by commoners. Due to this, the developers of the Smalltalk programming language grouped
together to form a portable and efficient virtual machine. This is termed as Squeak and is also
considered as public domain software. This made it very easy to run programs using Squeak
language and thus, the utilization of the Smalltalk programming language was achieved by
mostly all low to large size programmers. A sample program using the Smalltalk programming
language is depicted below:
Transcript show: 'Hello, World!'; cr.
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

6
PROGRAMMING LANGUAGES BASED ON SMALLTALK PROGRAMMING
LANGUAGE
Features of the language
There are various features of the Smalltalk programming language. The first is the object-
oriented programming and every component is termed as an object. The objects are connected to
itself or any other object by sending messages. This helps in achieving the required behavior of
the applications (Wertz, 2015). In addition, it also consists of execution semantics and concise
syntax. The system of the Smalltalk programming language consists of various components like
compiler, debugging tools, programming code which can be read and modified.
The next feature of the Smalltalk programming language is the framework of the UI. The
graphical objects are termed to be interactive and tangible (Callaú et al., 2014). This helps in
adopting application development by undertaking low effort and short feedback loops. Thus, the
text based domain can be changed into a graphical interface using this.
The third feature of the Smalltalk programming language is the adoption of powerful
tooling features. This utilizes the adoption of tools which can be used for writing, browsing,
versioning and executing the program codes (Kim, Nicolas & Nishio, 2014). In addition, there
can be multiple sessions of debugging tools which can be run concurrently.
The fourth feature of the Smalltalk programming language is that it can be used for web
development. It also provides layered abstraction sets over HTML and HTTP that helps in
building various web based applications that can be reused and maintained quickly (Denker et
al., 2018). This is mainly due to the fact that the program codes are very easily readable.
Rules of Smalltalk programming language
There can be no reserved words
No presence of control structure
No operators and
No built-in types
Concepts of Smalltalk programming language
Every type in the programming language is termed as a class which is not primitive type
Every expression is termed as a message expression
The following code is used to send a cr (carriage return) – this is a message to the
transcript object
"
Transcript cr.
“This line of code transmits a message to the transcript”
Transcript show: 'hello world’
The output of this program denotes the display of ‘hello world’ in the screen.
Sample programming codes depicting the features of Smalltalk
| myVar myVar2 | " Variable Definition"
PROGRAMMING LANGUAGES BASED ON SMALLTALK PROGRAMMING
LANGUAGE
Features of the language
There are various features of the Smalltalk programming language. The first is the object-
oriented programming and every component is termed as an object. The objects are connected to
itself or any other object by sending messages. This helps in achieving the required behavior of
the applications (Wertz, 2015). In addition, it also consists of execution semantics and concise
syntax. The system of the Smalltalk programming language consists of various components like
compiler, debugging tools, programming code which can be read and modified.
The next feature of the Smalltalk programming language is the framework of the UI. The
graphical objects are termed to be interactive and tangible (Callaú et al., 2014). This helps in
adopting application development by undertaking low effort and short feedback loops. Thus, the
text based domain can be changed into a graphical interface using this.
The third feature of the Smalltalk programming language is the adoption of powerful
tooling features. This utilizes the adoption of tools which can be used for writing, browsing,
versioning and executing the program codes (Kim, Nicolas & Nishio, 2014). In addition, there
can be multiple sessions of debugging tools which can be run concurrently.
The fourth feature of the Smalltalk programming language is that it can be used for web
development. It also provides layered abstraction sets over HTML and HTTP that helps in
building various web based applications that can be reused and maintained quickly (Denker et
al., 2018). This is mainly due to the fact that the program codes are very easily readable.
Rules of Smalltalk programming language
There can be no reserved words
No presence of control structure
No operators and
No built-in types
Concepts of Smalltalk programming language
Every type in the programming language is termed as a class which is not primitive type
Every expression is termed as a message expression
The following code is used to send a cr (carriage return) – this is a message to the
transcript object
"
Transcript cr.
“This line of code transmits a message to the transcript”
Transcript show: 'hello world’
The output of this program denotes the display of ‘hello world’ in the screen.
Sample programming codes depicting the features of Smalltalk
| myVar myVar2 | " Variable Definition"
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

7
PROGRAMMING LANGUAGES BASED ON SMALLTALK PROGRAMMING
LANGUAGE
myVar := SampleClass new. "Create Instance of Class Sample Class.
new is simple method call on object SampleClass not special operator
Everything is object"
myVar setSample: 1. "call method setSample: with one parameter"
myVar setSample: 2 with: 3. "call method setSample:with: with two parameters"
"method chaning java myVar.getAnotherObjekt().callThisObjectWith(23)"
myVar getAnotherObjekt callThisObjectWith: 23.
"Now Blocks"
myVar isRead ifTrue: [Transcpript show: 'I am Ready'] ifFalse: [Transcript show: 'Not Ready']
"Or somethig like C operator ? : "
myVar := myVar isRead ifTrue: [1] ifFalse: [2].
"Collection"
myVar := Array new.
"Write Collection on stdout"
myVar do: [:each | Transcript show: each printString].
"Blocks are also objects. That can take parameters. see also Ruby language"
"Blocks can be used do define new control stuctures or something like handlers"
myVar := [:par1 | Transcript show: par1].
PROGRAMMING LANGUAGES BASED ON SMALLTALK PROGRAMMING
LANGUAGE
myVar := SampleClass new. "Create Instance of Class Sample Class.
new is simple method call on object SampleClass not special operator
Everything is object"
myVar setSample: 1. "call method setSample: with one parameter"
myVar setSample: 2 with: 3. "call method setSample:with: with two parameters"
"method chaning java myVar.getAnotherObjekt().callThisObjectWith(23)"
myVar getAnotherObjekt callThisObjectWith: 23.
"Now Blocks"
myVar isRead ifTrue: [Transcpript show: 'I am Ready'] ifFalse: [Transcript show: 'Not Ready']
"Or somethig like C operator ? : "
myVar := myVar isRead ifTrue: [1] ifFalse: [2].
"Collection"
myVar := Array new.
"Write Collection on stdout"
myVar do: [:each | Transcript show: each printString].
"Blocks are also objects. That can take parameters. see also Ruby language"
"Blocks can be used do define new control stuctures or something like handlers"
myVar := [:par1 | Transcript show: par1].

8
PROGRAMMING LANGUAGES BASED ON SMALLTALK PROGRAMMING
LANGUAGE
"Evalute Block."
myVar value: 2.
"same as"
[:par1 | Transcript show: par1] value: 2
"method cascading"
myVar method1; method2; method3
"equal to"
myVar method1. myVar method2. myVar method3
These programming codes are used to write long codes. The texts that are wrapped in
quotes are termed as comments.
Style of the language
There are certain rules and guidelines of the Smalltalk programming language. The first
feature style of the language is that the codes are termed to be very readable and compact. The
next feature of it is that it can be dynamically typed. This helps in denoting the definition of the
expression at run-time (Ege, 2014). The next programming style conveyed is that the scope of
the program is considered to be static. Lastly, the inheritance model of the programming
language is termed to be singular in nature. This is the main point of difference between the
Smalltalk programming language and the Java programming language.
Language Evaluation
This section of the report discussed about the evaluation of the Smalltalk programming
language.
Basic OOP concepts and terminology
The main concepts of the Smalltalk programming language includes objects, fields,
OOPs, classes, methods, messages, inheritance, receiver, dynamic binding.
The object in the Smalltalk programming language is very similar to the other object
oriented programming languages like Java or C++. The objects are stored in memory which also
includes various reference fields (Brauer, 2015). The objects can be used to point to it or to any
other objects. In addition, these objects are termed as instances of classes. Each and every object
is used to belong to exactly one class. The hierarchy of the classes is considered to be tree-
shaped such that each class consists of exactly one super class.
PROGRAMMING LANGUAGES BASED ON SMALLTALK PROGRAMMING
LANGUAGE
"Evalute Block."
myVar value: 2.
"same as"
[:par1 | Transcript show: par1] value: 2
"method cascading"
myVar method1; method2; method3
"equal to"
myVar method1. myVar method2. myVar method3
These programming codes are used to write long codes. The texts that are wrapped in
quotes are termed as comments.
Style of the language
There are certain rules and guidelines of the Smalltalk programming language. The first
feature style of the language is that the codes are termed to be very readable and compact. The
next feature of it is that it can be dynamically typed. This helps in denoting the definition of the
expression at run-time (Ege, 2014). The next programming style conveyed is that the scope of
the program is considered to be static. Lastly, the inheritance model of the programming
language is termed to be singular in nature. This is the main point of difference between the
Smalltalk programming language and the Java programming language.
Language Evaluation
This section of the report discussed about the evaluation of the Smalltalk programming
language.
Basic OOP concepts and terminology
The main concepts of the Smalltalk programming language includes objects, fields,
OOPs, classes, methods, messages, inheritance, receiver, dynamic binding.
The object in the Smalltalk programming language is very similar to the other object
oriented programming languages like Java or C++. The objects are stored in memory which also
includes various reference fields (Brauer, 2015). The objects can be used to point to it or to any
other objects. In addition, these objects are termed as instances of classes. Each and every object
is used to belong to exactly one class. The hierarchy of the classes is considered to be tree-
shaped such that each class consists of exactly one super class.
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

9
PROGRAMMING LANGUAGES BASED ON SMALLTALK PROGRAMMING
LANGUAGE
Methods are similar to functions which are applied to any specific object. The methods
are used to call the objects for performing various related operations. The method is different
from the messages. A method is used to call the objects so that a certain operation can be done.
A message involves sending an instruction (Sowa, 2014). Methods can return an argument
whereas the messages cannot. The methods usually consist of executable program codes.
|newPerson|
newPerson := Person new.
newPerson setName:'Miller'.
newPerson setFirstName:'Fred'.
Object model
The objects can consist of one or more than one fields. The filed in Smalltalk
programming language can also be termed as instance variable. An object can consist of several
instance variables. In addition, each of the field consists of primitive values. There is also one
type of primitive data type known as the “Small Integer”. It is stored as a 31-bit integer with
two’s complement value or signed integer value (Besset, 2015). As the data types uses 31 bits,
the range of the values are -1,073,741,824 to +1,073,741,823. The arithmetic overflow results in
automated promotions to precision arithmetic which results in correct output.
The Smalltalk programming language is supposed to be an un-typed language. This
means that the compiler does not have any idea about the return type of a variable. Any type of
variable may represent a pointer or a small integer. Similarly, the same variable can be used to
denote both small integer and pointer (Bidve & Sarasu, 2016). This is mainly because a single bit
in a 32-bit word is supposed to represent the tag bit. The least significant bit in a variable
containing a pointer will be 0 and the least significant bit of the word containing a small integer
is 1.
In the Smalltalk programming language, the primitive types are considered to be the first
class objects. There is one single class known as the small integer and when a new method is
added to it, it can be used in the same process as any other method. In addition, we can also send
messages to the small integers (Brorsson, Eriksson & Gustafsson, 2017). At the runtime of the
program code, the virtual machine or the interpreter can differentiate between pointers and small
integers by considering the tag bit. If a pointer value is denoted, a process of normal binding is
used. On the other hand, if small integer value is found, then the virtual machine looks up for a
method named small integer in the class and executes it.
The objects consist of headers. These headers consists of information that is used to
deduce the object’s class, size pertaining to the object, the hash code related to the object, format
of it and the extra bits that are used for garbage collectors (Robbes, Röthlisberger & Tanter,
2015). The header inputs are followed by many fixed fields which are in turn followed by
various index able fields. After these bits, they are followed by raw bytes of data.
Message sending syntax
The syntax of the Smalltalk programming language is very complex and needs to
describe the role of messages. For each execution of the “message send”, there is a receiver with
PROGRAMMING LANGUAGES BASED ON SMALLTALK PROGRAMMING
LANGUAGE
Methods are similar to functions which are applied to any specific object. The methods
are used to call the objects for performing various related operations. The method is different
from the messages. A method is used to call the objects so that a certain operation can be done.
A message involves sending an instruction (Sowa, 2014). Methods can return an argument
whereas the messages cannot. The methods usually consist of executable program codes.
|newPerson|
newPerson := Person new.
newPerson setName:'Miller'.
newPerson setFirstName:'Fred'.
Object model
The objects can consist of one or more than one fields. The filed in Smalltalk
programming language can also be termed as instance variable. An object can consist of several
instance variables. In addition, each of the field consists of primitive values. There is also one
type of primitive data type known as the “Small Integer”. It is stored as a 31-bit integer with
two’s complement value or signed integer value (Besset, 2015). As the data types uses 31 bits,
the range of the values are -1,073,741,824 to +1,073,741,823. The arithmetic overflow results in
automated promotions to precision arithmetic which results in correct output.
The Smalltalk programming language is supposed to be an un-typed language. This
means that the compiler does not have any idea about the return type of a variable. Any type of
variable may represent a pointer or a small integer. Similarly, the same variable can be used to
denote both small integer and pointer (Bidve & Sarasu, 2016). This is mainly because a single bit
in a 32-bit word is supposed to represent the tag bit. The least significant bit in a variable
containing a pointer will be 0 and the least significant bit of the word containing a small integer
is 1.
In the Smalltalk programming language, the primitive types are considered to be the first
class objects. There is one single class known as the small integer and when a new method is
added to it, it can be used in the same process as any other method. In addition, we can also send
messages to the small integers (Brorsson, Eriksson & Gustafsson, 2017). At the runtime of the
program code, the virtual machine or the interpreter can differentiate between pointers and small
integers by considering the tag bit. If a pointer value is denoted, a process of normal binding is
used. On the other hand, if small integer value is found, then the virtual machine looks up for a
method named small integer in the class and executes it.
The objects consist of headers. These headers consists of information that is used to
deduce the object’s class, size pertaining to the object, the hash code related to the object, format
of it and the extra bits that are used for garbage collectors (Robbes, Röthlisberger & Tanter,
2015). The header inputs are followed by many fixed fields which are in turn followed by
various index able fields. After these bits, they are followed by raw bytes of data.
Message sending syntax
The syntax of the Smalltalk programming language is very complex and needs to
describe the role of messages. For each execution of the “message send”, there is a receiver with
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

10
PROGRAMMING LANGUAGES BASED ON SMALLTALK PROGRAMMING
LANGUAGE
an argument. The arguments can be zero or can be more than zero. There are three different
syntax forms of the Smalltalk programming language (Xinogalos, 2015). They are the unary
syntax, binary syntax and the keyword syntax.
The unary message sending syntax is used when there is no presence of arguments. An
example of the unary operation is depicted below:
x reset "a message-send in Smalltalk"
The quotes are used to describe comments which help in easy understanding of the
associated program code. In the example shown above, x is termed as a variable and the reset
keyword is termed as message (Roberts et al., 2017). There is no such syntax for sending
message. It is only considered as concatenation. In other types of object oriented languages, the
variables and the messages are separated by commas and braces to denote methods. There are
various examples of the unary syntax operations:
25 factorial
25 is the receiver
factorial is the selector
returns 15511210043330985984000000
'Cat in the hat' size
returns 14
12 printString
returns ‘12’ (a string)
‘20’ asNumber
returns 20 (an integer)
For the binary syntax message, a first class sending syntax is adopted. In this type of
syntax operation, there are two different variables which are utilized in operations. In the
example denoted below, x and y is termed as two different variables and the name of the
message is termed as +.
x + y
In addition, in the binary syntax messages, there is no need for pre-assuming the class of
the receiver. It can be any small integer or float variable or any other types of user-defined class
(Coupland, 2014). Moreover, the binary messages include only one argument. This can be any
characters or sequence of characters. The possible example are +, *, <=, ==. The binary
messages are executed from left to right.
1 + 2 * 3 * 4 + 5 * 6
PROGRAMMING LANGUAGES BASED ON SMALLTALK PROGRAMMING
LANGUAGE
an argument. The arguments can be zero or can be more than zero. There are three different
syntax forms of the Smalltalk programming language (Xinogalos, 2015). They are the unary
syntax, binary syntax and the keyword syntax.
The unary message sending syntax is used when there is no presence of arguments. An
example of the unary operation is depicted below:
x reset "a message-send in Smalltalk"
The quotes are used to describe comments which help in easy understanding of the
associated program code. In the example shown above, x is termed as a variable and the reset
keyword is termed as message (Roberts et al., 2017). There is no such syntax for sending
message. It is only considered as concatenation. In other types of object oriented languages, the
variables and the messages are separated by commas and braces to denote methods. There are
various examples of the unary syntax operations:
25 factorial
25 is the receiver
factorial is the selector
returns 15511210043330985984000000
'Cat in the hat' size
returns 14
12 printString
returns ‘12’ (a string)
‘20’ asNumber
returns 20 (an integer)
For the binary syntax message, a first class sending syntax is adopted. In this type of
syntax operation, there are two different variables which are utilized in operations. In the
example denoted below, x and y is termed as two different variables and the name of the
message is termed as +.
x + y
In addition, in the binary syntax messages, there is no need for pre-assuming the class of
the receiver. It can be any small integer or float variable or any other types of user-defined class
(Coupland, 2014). Moreover, the binary messages include only one argument. This can be any
characters or sequence of characters. The possible example are +, *, <=, ==. The binary
messages are executed from left to right.
1 + 2 * 3 * 4 + 5 * 6

11
PROGRAMMING LANGUAGES BASED ON SMALLTALK PROGRAMMING
LANGUAGE
Is executed as
((((1 + 2) * 3) * 4) + 5) * 6
The last type of syntax message is the keyword message. An example of the keyword
message syntax is depicted below.
x addKey: a value: b "Smalltalk"
In this example, there are two different arguments denoted by a and b. The name of the
message is addKey. There is a colon in the message name which is only used in case of the
keyword syntax operations. The colon is used to denote the syntax operation of the keyword
message. The name of the message cannot be termed as one contiguous token and when the
message is used, the name of the message will be spread by intervening with the expressions of
the argument (Bracha & Ungar, 2015). The syntax of the operation is denoted by one message
sending with ony one receiver and two different arguments. As the number of arguments is two
in this case, the use of colon is adopted for determining the syntax operation of the keyword
messages.
'this is a string'
copyFrom: 1
to: 7
'this is a string' is the receiver
copyFrom:to: is one selector with two keywords
1 and 7 are the arguments
returns 'this is'
For four arguments, the syntax is
'this is a string'
findString: 'string'
startingAt: 4
ignoreCase: true
useWildcards: false
'this is a string' is the receiver
PROGRAMMING LANGUAGES BASED ON SMALLTALK PROGRAMMING
LANGUAGE
Is executed as
((((1 + 2) * 3) * 4) + 5) * 6
The last type of syntax message is the keyword message. An example of the keyword
message syntax is depicted below.
x addKey: a value: b "Smalltalk"
In this example, there are two different arguments denoted by a and b. The name of the
message is addKey. There is a colon in the message name which is only used in case of the
keyword syntax operations. The colon is used to denote the syntax operation of the keyword
message. The name of the message cannot be termed as one contiguous token and when the
message is used, the name of the message will be spread by intervening with the expressions of
the argument (Bracha & Ungar, 2015). The syntax of the operation is denoted by one message
sending with ony one receiver and two different arguments. As the number of arguments is two
in this case, the use of colon is adopted for determining the syntax operation of the keyword
messages.
'this is a string'
copyFrom: 1
to: 7
'this is a string' is the receiver
copyFrom:to: is one selector with two keywords
1 and 7 are the arguments
returns 'this is'
For four arguments, the syntax is
'this is a string'
findString: 'string'
startingAt: 4
ignoreCase: true
useWildcards: false
'this is a string' is the receiver
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide
1 out of 16
Related Documents
Your All-in-One AI-Powered Toolkit for Academic Success.
+13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
Copyright © 2020–2025 A2Z Services. All Rights Reserved. Developed and managed by ZUCOL.




