 Well, my name is Alexandre Bergeron, as you just heard. I'm a backend developer working at WhatsApp, mostly in Scala. But as I'm saying in my next slide, I started coding in Python in 2007, actually. So it's one of my first few programming languages. And at the time, it was one of my favorite. And now it's basically one in my top two with Scala. And because I found that even through Scala is a study-type language, both of them serve a lot of similarities that I, as you can see in my next slide. Well, basically, Scala compared to Python is a study-type language. But both of them are object-oriented, functional and imperative hybrid languages that you can use to mix and match some programming styles. So you use a more functional approach when it's appropriate and use a more imperative approach. Let's say, as an example, if you want more performance or if you want to write something that's more imperative, it compounds the Java version machine so you can usually pretty easily call any Java libraries from this. It has type inference. So basically, when you're writing a value or variable, it will try to extrapolate the type from what is being assigned to it. So you want to explicitly specify the types as often as languages like Java. And also it's built for concurrency. So in the basic libraries, you've already got parallel expressions and asynchronous tutors, which kind of looks like, I think, tutors in Java except that they actually have a callback and they're composed with each other and actually work. And in the next version, there will be, like, async await. It kind of like will be coming to Python, I think, the next version in 3.4, I think. And also from C-SARF, F-SARF, so yeah. I'm going to start with some pretty basic stuff that basically is served with any programming language. Most programming languages I know. So basically, values and variables, well, there's two kinds of variables in Python. There's some mutable variables. So let's say, in that case, the mutable variable, which is assigned to test. We can assign another value to it at any time. The state could always change with a new value. And you've also got some val that are immutable that means that once you assign a value to it, it will never change. And also, as you can see, I'm not specifying that mutable variable is a string. Not specifying that immutable variable is an int. It's being inferred by the compiler. And also, I put some demo of a Java array because most languages have array except that in Scala, since it's mostly oriented as a functional imperative hybrid, we don't really use arrays because they're mostly mutable. And you don't really have control over what's the array content because it can link into other parts of your code. If I can continue with some basic control statements, you've got an if-condition which basically looks like everything you're doing in Java. But you can write it as a one-liner and you can even return a value from it basically like a turn-in operator in C languages. I haven't put brackets here because they're optional. I could have put brackets here or not. It's as you want. And we also got some try-cats block. KSE is just to match any kind of exceptions that happen here. Still, since it's mostly oriented to push you forward towards functional programming, you won't use try-cats blocks that often. So let's continue with a while loop which basically looks like every while loop you've seen. There's also a do-while loop. I haven't put it, but it's pretty similar to what you've already seen maybe in Java or in Python. And you've got a for loop here except that compared to all these control statements, for loop is not really a statement, but it's mostly syntactic surger for recall and collections. Like in that case, you're iterating for all values in a range from one to five. But actually, you're calling for each on that range passing it an anonymous function. And that's how it's being inferred from the four compilers. So basically, you've got a for loop, but it's mostly syntactic surger and it's even more powerful than that. This as we'll see further in the slides. Also, since it's mostly a functional programming language, you need to declare some functions. So basically, you declared it with the deaf keyword like in Python, as an example. So that function takes two parameters, X and Y, both of them are int. And it returns an int. I put it statically here just to show you that you can also specify the value. And I've implemented on run line, it's basically just a simple function multiplying two values here. You can call it like that. You got a special text for unit returning functions, but actually it might be deprecated in one of the up and coming scalar versions. So I'm not showing it to you. Instead, I'm just telling you that you need to specify that these functions return unit and acts like it's just a normal function. And that will just show the result of an int into a string that prints the function called, basically. You can also declare some anonymous function. I've shown you in the previous slide, in that case. I've just declared a function taking two parameters and implementing basically multiply, but just as an anonymous function here. And also, you can pass a function to another function. So I ordered function like you might use calorie in Python. In that case, that function, it's second parameter is a function taking an int and returning an int. Printed and in that case, it returns unit. So I guess it will infer a unit. But still, I think it's a best practice to actually specify that it's a unit returning function from my point of view personally. But I see most of the code I've returned in scalar uses that procedural syntax that might be deprecated in the next following versions. I've kind of learned this in the last year. So I'm starting to try to convert it to more explicitly unit returning types. But yeah, it's as you want in that case. And obviously it's an object oriented language. So you've got classes. And that's a special case of a single object. Basically, well, you've got abstract classes with our classes. You can't create an instance of it yet. You've got basic classes that extends your abstract class and that redefines that function that wasn't defined in the previous class. And that singledon object is basically a class that can only be one instance of the singledon pattern. You can also use it to create a singledon object of the same name as a class. That's basically the equivalence of a static method or the static keyword in Xevo. So you can, well, that's actually a typo. It should be a capital B here, but you can call that function using its last name then its function name from that singledon object. And let's go back into some four-fringler code to compare what I think is similar between Python and Scalo. Well, first, the collections in Python can be pretty much mapped one-to-one to some collection in Scalo. I just put a list, tuple, set, and dictionary here. Everybody familiar with these collections in Python? Yeah, so I think I can continue to the scalar equivalent. I replaced the list by sequence, which is basically the root of all the sequence-like collections in Scalo. You've got a single type link list, which is basically constructed with using these column-colon stuff that we'll see later, but that's not important. That's just the return type of that list. You've got a tuple, which isn't a collection in Scalo because it's completely immutable. So when you're creating a tuple, you can't change them. And all of these tuple types are pretty different, so they don't really behave as a collection. That can be a catch in some case, but you're not choosing tuples most of the time, so I don't think that's a big problem. Sets acts like, as I said, like sequences, they have many different implementations. And a map acts like a map construction using these roles, which basically allows you to create these maps. And all of these collection comes by default in an immutable implementation, but you can also use a mutable implementation if you specify it explicitly. If I can continue with some list comprehension in Python, pretty much everybody is familiar with them. So basically, in Scalo, you don't have list comprehension, you have four comprehension, which is if we go in depth in them, they're closer to like doonatation in Askel. But for the sake of this presentation, let's just say that they act on collection, they act just like a list comprehension in Python. So in that case, it's just a simple list comprehension iterating thing from one to three and yielding the results multiplied by themselves. Here, we've got a list of all the numbers from one to 10 that are multiples of three. And here, we've got a list of the polls of numbers between one and five that when added together, it gives you five. Just some quick examples. You can put it on one line like this. You can separate some flows with some semicolons, or you can use braces and put them on multiple lines as just an implementation detail. Yeah, I think any questions for this? And also, well, most of the time these functions are backed by a functional programming functions like you can see here in Python. Anybody not familiar with them here? So I think that's good. And in Scala, since their collection and their try to be object oriented, the like map filter combinations will be found directly on these collections and will take an anonymous function directly instead of taking a collection and anonymous function. So in that case, I don't think I must say here I'm giving an implicit parameter to my anonymous function. So instead of saying that this function takes a parameter named x and return x times x, if your parameter is only used the one once in your function, you can just place it by an underscore, which is often used for implicitly, implicit stuff. Like here, it's just an implicit parameter so you don't need to specify that it's named x. It'll be inferred by the compiler. And also, if you compare the Python implementation for some of these five, I have used a combination function from iter tools. There's an equivalent in Scala, but if you want to be formal, what the four comprehensive is actually doing, it's calling a flat map, which is basically a map followed by a flatten for uncollections. So like if you start from a list of lists of some type, you'll end up with a list of that particular type without all of these elements will be flattened in the same list. Obviously, there are some distinctions because since there are different languages and static typing is not the only distinction. Through Scala supports pattern matching, which in the beginning can look like a sweet statement like you see in languages like seeds, I was, C sharp, et cetera. So basically, you're just using your variable with the keyword maps and settling your different cases. So if you receive as a value that's of zero, it's you print, I'm printing zero. If I receive an end that's, excuse me, there's a typo here. I need to put end year. If end is smaller than zero, then it's negative. And as a digital case, it will be positive. I'll fix that typo on my slides on my GitHub repo. So I'll try to send a link. Any questions?