Benedikt Terhechte - Sharing Code between iOS & Android with Rust

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] thanks for coming everybody to this talk about sharing code between iOS and Android by using rust this talk is kind of packed so I will probably try will fill out the complete 45 minutes so without further ado let's jump right in surely about me I'm Benedict tester you can find me on Twitter as a tester I block a bit on adventure that me Milas makers develop I'm also a part-time conference dancer I have a podcast together with my coworker buzz Brooks it's contravariance we talk about Swift Apple development technology and apparently we also started to doing interviews now I work at thing which is a social network in Hamburg that is around 50 million users and we have three mobile apps that are all native we have a native Android app we have a native iOS app and we even have a native Windows app and when you have three native apps at some point you realize there's a lot of pain because what you get is you implement everything three times all the bugs that you have are also multiplied by three and you have a lot of alignment overhead which means that you make decisions and then you have to make sure that the logic is kind of the same for all three targets and that got us thinking what are the ways that we can use it Singh to actually reduce this overhead and there are a couple of ways of sharing code right I mean we all know there's react native and then there's c-sharp and then there's a model layer that you write in C++ you know about that that's something that Spotify for example uses or PS PDF kit and then you can also maybe write a model layer in Swift and coupling because they both there's cotton native and there's their Swift that runs on multiple platforms and in this talk we will investigate some of these options but mostly from a perspective of what up doing the model iron rust so this brings us to the to the first step a small short introduction into rust I will give you a brief overview of the language to see what does rust like what does it look like how does it compared to Swift and to continent and we will do a very small overview that is very general this is the logo on the right side it was started in 2006 it's a strongly typed language it's a lot of a.m. based just like Swift just like cotton linen it's driven by Mozilla so Mozilla is investing heavily into this language they have a mess mascot it's called fairest it's a crap because they call themselves recitations apparently Wikipedia has this to say rust is intended to be a language for highly concurrent and highly saved systems performance of idiomatic rust is comparable to the performance of idiomatic C++ now this is Wikipedia everybody can edit it so we don't know what this really means let's continue some projects that are using it our Firefox they are using it for their rendering infrastructure and for their CSS parsing and then Dropbox has a custom server file system Oracle is using it for a container and time and there are a lot of lot other projects using it a lot of cryptocurrencies use it but will not go down there rust really has remained principles that it tries to adhere to the first one is that basic operations must remain simple so if you want to write basic code or code that doesn't do something very difficult it should be simple to do so and also expensive operations should be explicit so if you want to do something that is expensive to do that it's let's say a heap allocation for example something that will cost time on the processor it has to be explicit so you have to know what you're doing and finally it tries to prevent data races and we will see these principles again in the course of the talk let's more talk more about general rust generally rust means it runs on a ton of architectures and a ton of operating systems and targets a ton of different runtimes but we you don't really need to know this right now because we are talking about Android and about iOS in this talk or not about we have things like net BSG so let's stare at some code and try to figure out what does rust look like first of all rust the semicolons if you write swift and if you write : this is a very sad news but we can't do anything about it you will see a lot of semicolons in this talk basic rustic looks kind of like this you will immediately see okay it looks a lot like Swift so we have four let binding so I'll let variable and then we can say if something is bigger than ten do something with it there's even a if let that they stole from Swift actually where if you have an optional you can unpack it and it also has two Poe types so you can create a couple with hunts with single and forty years old so this is the absolute basic functions look a lot like and Swift and also kind of like in continent where you have you the parameters and then in the end you tell you what you give back and here we even have an function that processes our string into an integer and returns an optional integer now you you can't use the syntax like in Swift but it's it's the same idea it's just a bit more explicit here we are creating a string and we're doing some stuff with the string it's all this is all not magic it's basic string operations interesting part is that the RUS provides the same unicode safety as you have in swift and this means that you can't just index on a string because you can't up could end up between two unicode endpoints and so this doesn't work so you have to iterate over the characters and get the right character which is how swift did it ends 53 but they change that now but and China doesn't in a similar way so this is also something that we know how it works because it's the very same across languages then they are structs this is what the track looks like we all know structs already from C and from from the Swift again nothing nothing much to say here and to be honest it's it's just as extract generics work again the same way you have a generic we have a container here with a generic type T and then there's the generic type T and then we can create a function called make container that returns a container of this generic type T and we even have type constraints where we say T has to be equal and if you really if you would just take the F n in this method and make it func it would read like Swift code so it's pretty much very very similar there's something called traits which is comparable to interfaces in copelan or to protocols in Swift so we say this is a protocol or an interface called countable it has to have a method called countered then we will be for struct and here we say that this struct implements the protocol and so now it conforms to this protocol to this straight to this interface and if we want to use it in a method that's what we do what we do we have a method it accepts two types and these types have to be of the protocol interface trade countable so nothing new I feel it's it's stuff we see every day just with slightly different syntax you can even do know this is something cuddling can do but a swift us you can do something do something called protocol extensions we are here we have a try countable again and here we do a general implementation uncountable and we at the extension of effort double and now everything that implements conforms to this protocol has access to the message double so again this is something we know closures work the same as in every modern language nowadays this is the syntax is a bit weird but in general they work for the same also no surprises honestly this is a closure and I can call it with a shorthand and it uses the Ruby style pipes instead of another syntax and this is a full closure where it doesn't use where you additionally have these parentheses again this I feel is like a basic for most modern languages there's an enum and pattern matching so here we have an enum with gender male or female and we can do a match and say if the gender is male print male and if the gender is female print female again this is something that we know from most languages there's a bit more stuff we can do we can do a more complex match where we say we have a tuple with language name and gender and if the language is German and the name is empty then a certain case should happen otherwise not and there's also more complex ways of doing stuff I don't want to go into the details here but you have associated types as you can see here and the enum can also have cases with associated data like here the the array of tea or a update which has to to topple items and and so on so this is like if I feel this is stuff that we see every day mostly in encoding and in Swift anyway and it's very pretty much the same the same interest there's not a big difference the that the last thing is error handling it uses result types this is something we often times to in Swift as well and I think it's also happen happening in encoding for certain things where you have a research that is either a value or an error and they also stole from Swift the idea of having a try operator to try if something fails and then just leave early so this is kind of the same with a slightly different syntax but all in all it's nothing new yeah and weak you can also reason okay so the differences are that you don't have classes its interest at all instead you do have reference types you also don't have sorry you also don't have reflection but you have compiled time macros and you don't have function overloading but you do have a Rabb operator overloading so this was like a very general overview of the language to just to see what it looks like and from here let's go one step back and say no if we want to do to share code between iOS and Android with rust why actually rust why not use C++ which is also a language that many people use and that's a fine language so I went to images of google chrome and I entered C++ memes and these are the images I got back this was the first one and this is the second one I got for C++ and the serpent is from the inventor of C++ himself we said C makes it easy to shoot yourself in the foot C++ makes it hard well but when you do it blows away your whole leg so this is what I got back and the idea kinda is that C++ is a fantastic language but it's also a very complex language it grow over years and it's kind of tricky to find good C++ developers and if you don't have good to C++ developers you have a lot of bugs because it's so easy to to introduce bugs into your code base and so the question is it's not whether C++ it's bad it's not many people use it but the question is maybe could rust be a better alternative if you're a cotton or a swift developer and you want to introduce shared code into your code base that's what we are trying to answer it so the next thing is well why even rust why don't use code and instead of this Kotlin ativ and their swift that run some different platforms so why would you want to introduce another language that's a good question and so the first thing is not everything you can do just because you can do is is good to do not everything is the right tool for the job not just because you should can do something you should do it as this example hopefully hopefully illustrates so in order to figure out how good are the how the a swift and Kotlin in comparison to rest I I wanted to write some code to figure out what what does it feel like and so I brought a couple of benchmarks now many people when they hear benchmarks that's what they say they say benchmarks are the devil because you optimize in different ways and they are really really tricky to compare and it's it's not really easy to get to get any meaningful numbers from benchmarks and that's totally right but hear me out here I try to write simple a genetic code it like very short snippets of code to compare what does the code look like and what is the end result and I will release everything on Twitter so that basically you can you can have a look at yourself so the first thing I try to do in Kirkland in rust and in Swift was this there's a very long string it contains numbers white spaces and comma and I want to split it by the commas so that I get a huge array of strings trim all these strings so that I just get the number part of the string convert that to integer and sum it up to get a final number so that's that's the the task I try to solve in these languages so the first thing you see is the rest code that's the upper function the upper f.n process so in rust we do contents split and then we map and over for each item we trim it and then we do something called filter map which which does another which which executes the closure and if the return is null or optional then it ignores it it's the same as compact map in Swift and then we do another filter and see if anything is below 100 and then we sum it all up now below that is the swift code and it reads really similar it says contents dot split map compact map filter reduce now some names are different fault becomes reduced and filter map becomes compact map but all in all the code is very very similar to my I it there's not a huge difference here the same with Scotland um the tap slow tap same with Scotland so the process again at the top you see the Russ code it says map filter filter fault and then the code link code is once again stairs contents dot split map to trim it another map to convert it to internal then filter it if it's not filtered again to get all these that 100 and folded so this is the basic code and I decided let's also look at the compiled times because one thing when you look at react native and we are envious right because they have this JavaScript spritz thing they have hot reloading so for them compiling is really fast and for us it's kind of slow so I also wanted to figure out how fast is it to compile this compared like with the different platforms and those are the numbers in wresting compiles in one second in swift and compiles in five seconds and oncodna native and compiles in 22 seconds and then let's have a look at the numbers how fast it is so the virus code takes 0.06 seconds the swift code takes 3 point 1 4 seconds for the same example and the colon native code takes two point nine two seconds and here I actually looked into the the implementation of Swift to figure out why is it so slow and what happens is that in the background the each string is a swift string and and for the trimming of characters it's converted to an objective-c string to do the trimming in Objective C and then it's converted back to a swift string and that the really expensive operation because swimming is not implemented in Swift but it's implemented in an object to see now if you write code and you want to share it across code bases you don't know that and you can run into issues like that where your code is suddenly really slow the next benchmark I try to look at is we have a huge array of numbers and then we want to split these numbers up into smaller arrays of eight numbers and split these small arrays of eight numbers into even smaller arrays of two numbers and then we sum up the two numbers to two to basically here make it one number and then we could be flatten it back to a long list of arrays just to figure out how good is the right processing how does a reprocessing work and once again we have even if n moving arrows look at look at that so this is the code I'll get it above is the RUS code below is the Kotlin code and you will see it really reads the same you we say chunks map and another time chunks map and then some in rust and then Kotlin we say chunked so there's an e detour chunk and then again map and some and we flatten and we flatten to in in rust so it's really similar code now in Swift it's a bit difficult there's no chunk method you have to do it yourself so we have to write an extension on a bi-directional collection to do chunks and then when we are dead we need two additional methods to do that it's the same algorithm but we have to do more work because the standard library doesn't doesn't have the code for that so let's look at compile times oh no I I also implemented the same algorithm in C because I wanted to have a an overview so how much faster is C when you write it in pure C just with a malloc and then some loops no no functional magic because a C doesn't really have that compile times so rust compiles in one second Swift comparison one second Cortland native take 30 seconds and Swift takes 0.21 seconds but that's of course not so interesting what's more interesting is runtime so let's look at the runtime rust takes one second to run the whole thing so it takes 12 seconds to run the whole thing now Kotlin native this is not the true number I stopped at 25 minutes I'm not sure I'm not sure how much longer it would have taken I don't know what happened there but it I just I had not not much not more time left so NC takes 0.8 seconds so let's get rid of cutting here just to see what the rest is like because this outlier is kind of difficult to see it so Russ takes one second and swift takes 11 almost 12 seconds for the same code and here I wondered what happens if I rewrite this code from functional list all this map and chunked and so on into the same way I do it and see like very iterative code and when we do that then the numbers are kind of different then Russ takes two one seconds it doesn't get any faster Swift is suddenly almost faster than Russ it actually is : only takes it while it finishes for one and it's done after seven seconds so it's also a lot better and see obviously I didn't change anything there and so the moral here is that in rust you can use all these functional operators and the code is always as fast where it's incontinent in Swift it's a huge different whether you write for loops or you're use Maps the last example I'm I'm trying to do as a benchmark is JSON parsing because we pass a lot of J'son every day and so the question is how fast is that and and how how does that work now here I'm by day in my day job I'm a swift developer so I'm not an developer so I looked into what the native and I found this thing can library work and coordinated for a JSON library and it said at the bottom this would likely require a pretty significant rewrite to get rid of all the Java imports and I couldn't find a way to do JSON processing like from Jason into classes without Shin serialization in Cortland native because apparently it wasn't possible it may be possible I couldn't find it then I'm sorry about it but I couldn't figure it out and so for this benchmark I can only use Swift and rust and so here what we have here is above this rust we have a annotation that says deserialize which is the same as codable in Swift which tells the compiler this should be d serializable from let's say Jason and then we create an actual struct of a lot of time not all the types are listed here but it's really the same code kinda there's not much difference and then we tell the compiler ok you get in rust you get a string in please convert it into a array of media objects and the same in Swift where we say ok you get a you get a string in and please convert it into an array of media objects again performance russ takes 0.18 seconds with takes three seconds to could parse in a quite large J'son struct now this is not everything that we should look at because one additional thing that I feel is important for mobile devices is how is the memory buffet behavior how much memory do these things consume and so for all the benchmarks that I did I also tracked the memory and so here we see the average memory numbers so for Swift its 138 megabytes in average for the benchmarks that I did in rust at 6 megabytes and in coordinates 331 megabytes which I feel is a huge difference especially if it's code that you share on all platforms so going back from here but what do we see we see we saw that we have the desert very similar quote I feel like most of the code we saw wasn't that much different between cotton in Swift and rust it's it feels like it feels like you know the basic other algorithm and then it's really the same the code in the code was much faster in rust actually I'd also consumed less memory and there is a stable and better standard library in rust so we had an issue with Swift where something wasn't implemented the chunk method and was called in native we had problems with was the J'son and with rust we don't have that because rust doesn't really run on a platform it's it's a multi-platform language by design a lot of the packages for Swift are written for and a lot of the packages for Kotlin written for android and they don't magically cross-platform but all the rest stuff works automatically cross-platform so this is a huge huge boon but now if you're a swift or a Kotlin fan you may see this and say no this is certainly wrong and that guy did something stupid with the benchmarks no that's the case I'm going to release the code for the benchmark and you can have a look yourself and see if there's if I did something wrong and create a pull request that would be very happy for it so we saw the first of the three principles I mentioned earlier does this actually work again so basic operations must remain simple most of what we saw here was basic code and this basic code was simple code it looked the same in all three languages know this - connection okay so the next thing is we would go back to sharing code between iOS and Android with rust and this was our main topic and now we will be to understand rust a bit better and so let's go for a demo because oh no it does let's have a small demo because now I want to show you what it looks like I have a project written in rust it's a really complicated project what it does is we have a smuggler struct here it's a worker and we have a initializer to create a new worker and then it has one method called action and it's the phone pick enough okay then we have one method called action and what it does is it gets the string in it replaces the word with gooch and then it returns that as a string that that's really everything it does and what we want to do is we want to get this - to use it from iOS and from Android and for Android that's really easy we just write this additional wrapper which basically takes Android create a new Java class called worker of the rust type worker that has one constructor called new and it has one method called action that gets the string in and returns a string and this is everything we need and based on this what we get is we get a auto-generated work in Java so it says even you're automatically generated by rust Swick and then we can use it like this we can create a new worker like we do here and we couldn't call the action method on the worker and we get hello world back and so if I look at the emulator here it says Oh it's not running so let's start it again and meanwhile while this is running let's look at the iOS implementation from Rus because that's actually a bit more difficult like the the the nice way of doing it as it is for Android doesn't it doesn't work on iOS there it's a bit more complicated what we do is we have to write some code to expose sea types and I don't want to go into details here but this is a bit verbose so we have we create a new function called session new and rust that create that returns a pointer and then we create the function set session action which gets the string in converts the C string to a rest string quotes it on the on the worker object that we have and then converts the output the result return string to a CF string which is compatible compatible with objective-c and tell trusts to forget this string so this is a bit verbose and it'sit's not as nice as it could be however when I go to Xcode what we get is we get the same simplicity so we create a session here we call the session action with a string called hello world and then we edit on the label and then when we look at the simulator the simulator shows hello Would and now when I go back to here and I change this code here to Poland and save it and I go back to Xcode then just by running it here it will automatically so the the building process of rust is integrated into the IDs and it will automatically recompile the rest code edit all to the to the binary and when I now go back to the simulator you will see that it says hello Poland so the way this works is that there is a a build script that is set up for us called Bill table RS which is kind of complicated where you define what your project is like and this is where you can explain it how to integrate rust with iOS and Android and so there's a couple of things you have to define in the initially and then there's a bit of code most of that can just safely be copied over but but this is basically the all the logic that integrates rust with different platforms the downside here is that it is a bit more complicated but then again if you if you work in a company where you actually need share code between multiple platforms you're more than developed one developer and you probably have a team that is responsible for this kind of thing and you're a multiple people and then it's much more bearable to to have this overhead and there's also a similar similar overhead you have mid with languages like like government for example now after the demo there's one different additional thing you can do and that is there's a text editor from Google called Zhai which is they are working on that as the default text editor for the new operating system Vox yeah and it is written in rust but it has native front-end so there's a version of it that runs on Mako has written in Swift there's a version for Android with Ninh Kotlin there's a version for Windows written in c-sharp and so on and so since the the core is written in rust they also have to do cross-platform and what they do is a very smart idea they realized that instead of having multiple functions in rust that are called in the user in the address and so on it exposed these functions you can just expose one function called action you give a Jason and you get Jason back so the communication between your host and your shared library works over Jason and then what you give it in is you give it an action is insert user parameters name age and Department and you get back action and result and doing it that way allows you to just have one pass instead of doing something more complicated now you will probably say well there's the JSON parsing over it and there is but there's also stuff like protocol buffers and message pack and flat buffers that are much faster than Jason that you can use as an alternative and finally if you if you use Ruby in your company for example you just need these couple of lines of code where you see the arrow to expose your quote from from rust to Ruby and create a ruby gem or if you want to create a Python shared library with your code that's how you do it and if you wanted to use an to use it in a browser with swept assembly you just use the wasn't banking property annotation and then you can compile it on to Weber's MD and use it in the browser so it's very flexible in terms of creating shared code for share platforms now the the next thing that we want to want to look at let me try to reconnect with the phone that's easier yeah so the next thing we want to look at is more features that Russ says that might be beneficial for share for writing shared libraries and please have a look at this beautiful and cute dock because the next thing that we are looking at is memory management I hope you took a bit of cuteness so in Kotlin Java peasants on there's a garbage collector and it's Swift there's automatic reference counting and in rust there's something else called the burrow checker and you might have heard about it and with people usually mention it when they mention pain and we will try to briefly understand what it's doing so what the Burrow checker is doing is here we have a variable that called a and then we assign a to B and now when we try to print a we get a compiler error this doesn't fly so that this does not compile which is probably against our intuition let's have a look at another example here we create a value called test and then in our while loop here we are calling a function G with value again this will not compile which is probably against our intuition and the reason why this does not work is because rust does not use pass by value or pass by reference it uses something called pass by move so here we are initializing a with one and then here we are moving a into B which means a is uninitialized it doesn't exist anymore it disappears it's not there anymore so when we try to access a here we can't because a has become B it's gone another example and this will make more explicit how drastic that is it is here we create an example and then we call the function register with RA and register as we can see above that's really doesn't work well register takes in text in something and then we call process and again here we get an error because we already consumed a when we called register now this is safe to say that you are probably saying what how are we supposed to write code like that because if you can't even use a function more than once how do you want to do it so there's a concept called ownership and rust and this is like the basic of how memory management and rust works and we will only touch it really briefly and fly through so the first thing is you can only get you always have one owner and then you can have multiple point references to this value so you can have one pointer another point to another point are they all safe so they all point at this one at this one at number what's important is that the compiler makes sure that the owner always lives longer than the references so you cannot create a reference and then the owner dialogues for example and the reference is still live that's impossible the compiler will make sure so in this case the compiler will make sure that your memory works correctly there's one additional problem here and that is that you can either have one mutable reference so let's say a mutable reference to an array that you want to insert stuff in or you can have unlimited immutable references but you can't have both so that means as soon as you have read access to something there's no way to get right access to it so can you can either have write access or read excess but not both hats at the same time this makes it kind of tricky to write code right because here it's simple we create an immutable reference for something and then we create at the bottom another mutable reference for something else and that works fine so here we can see that but if you want to do something different here we create a example it's it's mutable and we get a reference and now we want to get a mutable reference it doesn't work the compiler will send although this doesn't fly and you would probably say this is madness you can't write complex software like that because if you can't how do you want to it I can't even and so that's true and there's a solution for that as well in rust and that's called smart pointers and what it does is and now you will feel oh I I know this so it has a type called arc which is an atomic reference countered point or know if you know Swift you will say oh I know this this Swift works right and you can do it in Rus too but you have to be explicit about it and note that there's also a type called reference counter pointer which is like arc but it's you can't use it between threads it's only for for one thread so because it's not atomic and then in Swift everything uses copy and write types you can do that too in rust but you have to be explicit about it and finally you can also look at stuff on the heap if you want but once again you have to be explicit about it you have to tell it this has to be allocated on the heap and so that's what rusts smart pointers are for oh I even ever-moving error look at that so back to principles expensive operations should be explicit we just saw that like everything that is kind of expensive you have to be explicit you have to tell us that this is really what you want otherwise it doesn't fly with that we go to the final topic and this is one of the coolest features that the rest has and in order to understand it we had to go through the memory ordeal it's called fearless concurrency and honestly that's what the rest people call it so it's not my idea and so here it's a very simple problem like this is a buck instant it was something with some code I wrote in Swift so I have a mutable array called data and then I dispatch it on 100 threads and from there I try to append data to it so that means I will get a data race because like all these different threads are trying to access data that's bad but the compiler for him for the compiler it's fine this is the problem so let's do this try to do the same thing in rust we create data here we spawn 100 threats and in there we try to push data on it so this already doesn't work because as we remember they can only be one owner and so the first time we spawn a threat that owner is gone so we can't spawn it a second time so this this doesn't fly but we are smart we know smart pointers so what we do now is we create a RC so we create a reference counter type with it and now we create a clone of the restaurants called the type and then we move it in but it still doesn't work because not the compiler says that you cannot use the reference counter type between threads safely it's impossible because the reference counter type is not atomic what we need is a atomic reference counter type okay so let's use that we use an atomic gate reference counter type and now we're sorry and come on we use a atomic reference counter type and then the compiler is still not happy because it tells us that the atomic reference counter type is not mutable because the item it with the reference counter types a BT by default immutable again because you can only have one honor so finally we do what we should have done in the first place even in Swift we add two mutex to be able to add a lock so this is something you should have done in the first place it's just the Swift on the cutting controller but new compiler wouldn't have told you but russ tells you so once we add the mutex we get the clone of the reference counter type and then we lock the mutex and we get the data we push data to it and we are done so this works and now we have concurrency and we can rest assured that there's no bug that we could have introduced in the concurrency because the compiler was really making hard make giving us a hard time bringing us back to principles prevent data races we saw that so data races are impossible because this is not something that the compiler will even allow there are a couple of other things that Russ does you have eugenic macros with IDE support they are go like channels as in the goal language in the standard library futures are coming soon with async await they are really fast web frameworks it has rostering static strings it is a fantastic that cabman and package manager it has associated types with generics essential static arrays a lot of times ok I know enough stuff enough talk what did we find now this is the main question what we do we find out here so the first thing is rust is kind of easier than in say us and then C++ which doesn't necessarily make it better but it's if you are not a C++ developer but you're a swift or a cotton developer and you need to share code then this is a good target because it makes it easier to write code that is safe and you don't have to fear of introducing more bugs into your code base and it's also much closer to Swift or Cortlandt so you don't have to understand C++ template in for example or the gazillion ways of it's say in initializing an object in C++ it's also really fast so it's not like you you're losing anything it also has a couple of downsides so it doesn't have classes there's no easy shred mutable state no for me that's kind of an upside but it makes it really tricky to structure your programs the initial late running face is hard so this memory management board checker thing is kind of difficult it's also difficult to hire for us because it's a new language and the tooling if you want to create a OS and and Android targets is especially young so it's not as good as it is for C++ on the other hand it's way worse for switch and for Kotlin if you want to create cross-platform tools so I would say the rust is not as good as C++ but better than the rest going back to the main topic that we had sharing code between iOS and Android and write it with rust so is that something you should do if you want to know and so for me I would say yes that's actually if if you are in the position where you have a swift or cutting code base and you want to share code and you don't have anybody on your team that is really good at C++ then this is not a bad thing to do and the reasons for that are this is first of all it's great for the Model A I know we are not talking about the UI layer here right we don't want to create UI syndra's it's terrible for doing Rick UI stuff but it's really good for a model layer stuff because first of all it's built for a multi-core future like it's pretty good at preventing data racers it's really good at concurrency and these are mobile devices nowadays they have like eight cores 6 crores 10 cores in the future and you really want to leverage these course without adding additional complexity are on concurrency to your codebase and Russ is kind of made for that it's also very very safe and fast so it's much much much too here for you to introduce bugs into your codebase and you still have fast code it's not like all the safety and all the features are run concurrency make it tricky for you like make your code slow it actually faster than you would get any many times then Russ doesn't it it doesn't belong to a platform Swift belongs to iOS Android coding belongs to iOS to Android and rust doesn't belong to anybody's and code and it's used a lot in Firefox and Firefox is by default a cross-platform application which means that there's a lot of really good Christ's platform libraries for us that you can already leverage and then it's much closer to Swift and code and then C++ if you if you see C's know some C++ they are really difficult things you can do and with the stretches was rusted sexually much eat much easier oh I already had that this kind of finishes the talk and thanks for listening I have a couple of links if you're interested in the language if you want to know more about it
Info
Channel: Jug Łódź
Views: 5,027
Rating: 4.9310346 out of 5
Keywords: jug, lodz, java, user, group, mobilization
Id: -hGbMp0sBvM
Channel Id: undefined
Length: 37min 9sec (2229 seconds)
Published: Tue Nov 27 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.