Language development
Discuss About The Languages Based On Smalltalk Programming Language?
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, economics, 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.
This section of the report discusses about the development of the language and its relevant topics.
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.
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.
Language overview
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.
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.
This section of the report discusses about the overview of the Smalltalk programming language.
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 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.
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.
- There can be no reserved words
- No presence of control structure
- No operators and
- No built-in types
- 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.
| myVar myVar2 | " Variable Definition"
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"
"metod 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].
"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.
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.
This section of the report discussed about the evaluation of the Smalltalk programming language.
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 business 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.
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'.
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.
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 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 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 * 6Is 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
findString:startingAt:ignoreCase:useWildcards: is one selector
‘string’, 4, true, false are the arguments
returns (11 to: 16)
The syntax operations used for the Smalltalk programming languages are termed to be m ore simpler and easy to be used. In addition, the execution of the program can be done by using the top-down algorithm of parsing (Callaú et al., 2013). Similar to this, there are various considerations to the transcript related messages. The various messages that are used to denote transcript operations are listed below:
clear the Transcript
show: aString
display aString in the Transcript
print: anObject
display a string representation of anObject in the Transcript
nextPutAll: aString
add aString to the display buffer
endEntry
put contents of display buffer in Transcript
empty the buffer
flush
Same as endEntry
tab cr space crtab crtab: anInteger
put given character in the display buffer
The programming language was responsible for contributing to the development of the software industry.
The Smalltalk programming languages helped in developing the virtual machine which helps in adopting platform-independent concepts in software development. This type of technology is being used by Java and .NET.
The language was also involved in discovering the just-in-time compilation which helps in improving the software performance.
Utilizing this programming language, the discovery of the integrated development environment was initiated (Fabry & Galdames, 2014). This involved text editors and class browsers and even debuggers.
The language also includes closures which are considered as first-class functions. Closures are termed as callback functions which were responsible for determining the location of the local variables at the time of defining.
Smalltalk introduced the MVC (model-view-controller) which is used for implementing the user interfaces. In addition, it is also accountable for producing test-driven development and extreme programming.
The main features of the language are image-based persistence and object oriented programming (Nistor et al., 2013). In addition, live programming concept is adopted. It also includes advanced techniques for debugging and an uncluttered IDE interface.
The Smalltalk programming languages was also responsible for developing object based databases. For example, the GemStone/S is still a object database which can be scaled to meet the performance demands.
It was also responsible for the development of the refactoring browser. Furthermore, the development of the GUI and WYSIWYG has also been initiated by the Smalltalk programming languages.
Conclusion
The major advantage of the Smalltalk programming language is that it reduces the problems evident in other object oriented programming languages. There can be no evidence of distracting features or syntactical clutters. This also helps in understanding the object oriented language at a different perspective. In addition, the object oriented concept utilizes the basics of the programming by using methods or classes, reflection and message passing. Moreover, the Smalltalk programming language is also effective in processing as an instructional language. This is the main reason for making the language a popular choice for programmers.
This report includes a discussion about the development of the Smalltalk programming language. The various concepts corresponding to this discussion is also included in this report. This report also includes a discussion about the overview of the language and the various other concepts pertaining to it. Moreover, this report also includes the evaluation of the language and the assessment of it for providing a general idea for the language. Lastly, this report concludes by showing the further advantages of the language.
References
Allende, E., Callaú, O., Fabry, J., Tanter, É., & Denker, M. (2014). Gradual typing for Smalltalk. Science of Computer Programming, 96, 52-69.
Besset, D. H. (2015). Object-Oriented Implementation of Numerical Methods An Introduction with Smalltalk.
Bidve, V. S., & Sarasu, P. (2016). Tool for measuring coupling in object-oriented java software. International Journal of Engineering and psychology, 8(2), 812-820.
Bracha, G., & Ungar, D. (2015). OOPSLA 2004: Mirrors: Design Principles for Meta-level Facilities of Object-Oriented Programming Languages. ACM SIGPLAN Notices, 50(8), 35-48.
Brauer, J. (2015). Basics of Object-Oriented Programming Using Smalltalk. In Programming Smalltalk–Object-Orientation from the Beginning (pp. 31-58). Springer Vieweg, Wiesbaden.
Brorsson, E., Eriksson, C., & Gustafsson, J. (2017). REALTIMETALK AN OBJECT-ORIENTED LANGAUGE FOR. Real-Time Programming 1992, 81.
Callaú, O., Robbes, R., Tanter, É., & Röthlisberger, D. (2013). How (and why) developers use the dynamic features of programming languages: the case of smalltalk. Empirical Software Engineering, 18(6), 1156-1194.
Callaú, O., Robbes, R., Tanter, É., Röthlisberger, D., & Bergel, A. (2014, October). On the use of type predicates in object-oriented software: The case of Smalltalk. In ACM SIGPLAN Notices (Vol. 50, No. 2, pp. 135-146). ACM.
Coupland, J. (2014). Small talk. Routledge.
Denker, M., Anquetil, N., Ducasse, S., Etien, A., & Pollet, D. (2018). Project-Team RMoD (Analyses and Language Constructs for Object-Oriented Application Evolution) 2017 Activity Report (Doctoral dissertation, INRIA Lille-Nord Europe).
Dennis, A., Wixom, B. H., & Tegarden, D. (2015). Systems analysis and design: An object-oriented approach with UML. John wiley & sons.
Ege, R. K. (2014). Programming in an Object-oriented Environment. Academic Press.
Fabry, J., & Galdames, D. (2014). PHANtom: a modern aspect language for Pharo Smalltalk. Software: Practice and Experience, 44(4), 393-412.
Felgentreff, T., Hirschfeld, R., Graber, M., Borning, A., & Masuhara, H. (2016). Declaring Constraints on Object-oriented Collections. Journal of Information Processing, 24(6), 917-927.
Jones, T., & Noble, J. (2014, July). Tinygrace: A simple, safe, and structurally typed language. In Proceedings of 16th Workshop on Formal Techniques for Java-like Programs (pp. 1-6). ACM.
Kim, W., Nicolas, J. M., & Nishio, S. (2014, June). The Object-Oriented Database System. In Deductive and Object-Oriented Databases: Proceedings of the First International Conference on Deductive and Object-Oriented Databases (DOOD89) Kyoto Research Park, Kyoto, Japan, 4-6 December 1989 (p. 223). Elsevier.
Mernik, M. (2013). An object-oriented approach to language compositions for software language engineering. Journal of Systems and Software, 86(9), 2451-2464.
Miranda, E., & Béra, C. (2016). A partial read barrier for efficient support of live object-oriented programming. ACM SIGPLAN Notices, 50(11), 93-104.
Nistor, L., Kurilova, D., Balzer, S., Chung, B., Potanin, A., & Aldrich, J. (2013, July). Wyvern: A simple, typed, and pure object-oriented language. In Proceedings of the 5th Workshop on MechAnisms for SPEcialization, Generalization and in HerItance (pp. 9-16). ACM.
Robbes, R., Röthlisberger, D., & Tanter, É. (2015). Object-oriented software extensions in practice. Empirical Software Engineering, 20(3), 745-782.
Roberts, R., Marr, S., Homer, M., & Noble, J. (2017). Toward Virtual management Adaption Rather than Reimplementation.
Sowa, J. F. (Ed.). (2014). Principles of semantic networks: Explorations in the representation of knowledge. Morgan Kaufmann.
Wertz, H. (2015). Object-oriented Programming with Smalltalk. Elsevier.
Xinogalos, S. (2015). Object-oriented design and programming: an investigation of novices’ conceptions on objects and classes. ACM Transactions on Computing Education (TOCE), 15(3), 13.
Zeigler, B. P. (2014). Object-oriented simulation with hierarchical, modular models: intelligent agents and endomorphic systems. Academic press.
References
To export a reference to this article please select a referencing stye below:
My Assignment Help. (2019). Essay: Smalltalk Programming Language - Overview And Concepts.. Retrieved from https://myassignmenthelp.com/free-samples/languages-on-smalltalk-programming-language.
"Essay: Smalltalk Programming Language - Overview And Concepts.." My Assignment Help, 2019, https://myassignmenthelp.com/free-samples/languages-on-smalltalk-programming-language.
My Assignment Help (2019) Essay: Smalltalk Programming Language - Overview And Concepts. [Online]. Available from: https://myassignmenthelp.com/free-samples/languages-on-smalltalk-programming-language
[Accessed 04 December 2024].
My Assignment Help. 'Essay: Smalltalk Programming Language - Overview And Concepts.' (My Assignment Help, 2019) <https://myassignmenthelp.com/free-samples/languages-on-smalltalk-programming-language> accessed 04 December 2024.
My Assignment Help. Essay: Smalltalk Programming Language - Overview And Concepts. [Internet]. My Assignment Help. 2019 [cited 04 December 2024]. Available from: https://myassignmenthelp.com/free-samples/languages-on-smalltalk-programming-language.