Welcome to the perspective unit about high level languages. As usual in this perspective units we answer frequently asked questions and so let's see which questions we have today. Can you sum up the differences between Jack and the typical object oriented languages? Well, I assume that you refer to languages like Java, C#, C++ and so on. So Jack is actually a nice little language. It features most of the essential features that you would expect to see in procedural programming. Things like variables, looping, erase, sub routines and on top of it, it allows constructing and manipulating objects. At the same time, Jack has quite a few glaring limitations. To begin with, its primitive type system, consisting of three types only, is well, quite primitive. And it has only two control structures, if and while. And as an object based language, it features null inheritance, which is one of the most celebrated features of object oriented programming. So, to sum up Jack is a nice little language that leads much to be desired. So you maybe justified to wonder why didn't we add all these desired features to the Jack language? The answer is that like many other systems and languages that we designed for teaching Nand to Tetris, our goal was not to create powerful tools, but rather to expose just enough functionality so that you guys will capture the essence of what the tool, in this case, high level language is all about. So if you adopt this minimal, and highly focused view, or agenda, if you will, you realize that any additional feature, which is not absolutely necessary is not really a benefit, it may well be a liability. In Nand to Tetris we strongly agree with the French author Saint-Exupéry, who said, among many other things, that perfection is achieved not when there's nothing more to add, but rather when there's nothing left to take away. So with that, let's turn to the next question in our frequently asked questions. What is a weakly typed programming language? Well, strongly typed languages are quite fussy about how you declare and use variables and data types. First of all, you cannot use a variable before you formally declare it, which actually makes a lot of sense. And once declared, there are all sorts of restrictions on how to assign to this variable, values that don't agree with its declared data type. Now this action is sometimes called casting. And in a strongly packed language casting is carefully regulated by the language and obviously by the compilers that implement this language. And these casting restrictions are important because they prevent all sorts of possible damages. For example, when you assign let's say 3.14 to a variable of type Int, you're going to lose the 0.14 fraction and this data loss may or may not be intentional. Therefore a strong typing policy makes a lot of sense and programmers should be thankful to the language that it is quite picky about it. Now none of this exists in Jack. In Jack, you can assign a value of any data type to a variable of any other type. And the language never complains. So as the language designers, why did we allow such a casting anarchy? Well the answer is that, first of all they said in the previous question. We wanted the language specification to be minimal and regulating casting requires a lot of headache. In addition, permissive casting can be exploited cleverly in order to allow all sorts of high level programming tricks that's enable us to take control of the underlying hardware platform. And this will become very handy when we will set out to develop the operating system toward the end of the course. This OS will be implemented in Jack, just like Unix is implemented in C. And as you will later discover, the weak typing of Jack will allow us to contrive all thoughts of ingenious hacks. Without which we could not have written the OS using a high-level language, or at least using Jack. By the way, this is one reason why operating systems are typically developed in C++. It's not that C++ is weakly typed, in fact, C++ is a strongly typed language. However, it provides all sorts of mechanisms for deliberately weakening the type system whenever such weakening is intentionally desired by the programmer. This liberal casting is very useful when you write operating systems and embedded systems, and in general software that runs close to the hardware level. So with that, let us move to the next question. And let's see. Jack has some syntax conventions, like let and do that are not customary in other programming languages. Well, they are customary in some old languages but not in modern ones. Why did you introduce these syntax conventions to the language? [COUGH] Indeed in Jack if you want to assign a value to a variable, you have to say let x equals ten and not just x equals ten. And if you wish to call a void subroutine, you have to say, do fu, and not just fu, as you would in Java or Python. These prefix tokens were introduced into the language with one purpose. Allowing the development of elegant, simple and minimal Jack compilers as you will do in the next two modules. One of the most fundamental operations of a compiler is called parsing. And parsing is the act of analyzing the syntactical structure of the program that we seek to compile. Now it turns out that when you attempt to parse some source code in any language, it always helps if the first token in the given code gives away or indicates which statement we're dealing with. Is it awhile, an if, a let, a do, a return, a function declaration, or what not? Therefore, although let, and do, are a bit of a nuisance, when you write Jack Code, and Jack applications you will be quite grateful for these prefix tokens when you will have to write the parser of the Jack Compiler later in the course. In fact it will happen in the next module of Nand2Tetris part two. All right, so Let's see do we have more questions? No, we had only three questions. And I wish to end this unit with a comment about the Jack operating system. As you know, the basic Jack language is augmented significantly by the complete functionality of the Jack operating system. This OS is packaged as the standard class library of the Jack language. And being a class library it can be extended, it will. This modular in open end architecture is very typical of modern languages like Java, Python and C++. For example, take Java. Now I remember that 20 years ago, I helped build a new computer science school at IDC where I'm now a faculty member. And one decision that we made back then 20 years ago, was to adopt Java, is the first programming language that our students will learn in introduction to computer science. Now this was quite bold gamble. Because back in 1996, Java was completely new and it came with very small class library. And since then Java became of course a formidable language. And today the Java Class Library contains more than 4,000 classes. And yet, during these two decades of fantastic growth in terms of capabilities and functionalities, the basic Java language remained more or less the same. So I hope that I managed to convey to you the beauty and utility of this software architecture. As a language designer, you specify a simple, elegant and compact language. And then using the abstractions of classes and several things, you allow people to use this language to extend itself in infinite different ways. In my view this combination of simplicity on one hand and infinite extensibility on the other, is perhaps the most remarkable feature of modern programming languages. So with that, this is what I wanted to say in this perspective unit. Of course, we could have said much more about high level languages, but time is limited. So we'll end the module here and in the next module we're going to begin writing our compiler starting with parsing.