I have gone over the language specification of Carbon, which has led me to conclude that anyone porting their C++ code to Carbon will experience very many of the same positive benefits I experience in going from Objective-C to Swift. Going through this experiencing porting a couple of iOS applications to Swift, I made many positive observations regarding benefits of moving to a more modern language. You could leave half the code rarely edited alone and not port it. With Swift, you could move almost as fast or slow as you wanted. Normally, a rewrite is a big, carefully planned project with a lot of pain. I could split out individual methods on Objective-C classes, rewrite them to Swift code, recompile, run and see everything work just as well as before. That approach is what led to Swift.Īs a long-time Objective-C developer, I got to say that really paid off. In the end, what really worked was creating a modern language from scratch, specifically designed to integrate tightly with the Objective-C runtime. There was an honorable attempt called Ruby Motion which built Ruby on top of the Objective-C runtime for much righter integration. The simple reason was because neither of those languages were ever designed with Objective-C in mind. A massive investment existed in quality Objective-C libraries, which simply could not be used from Java and Ruby in a way that wasn’t clunky in one way or the other. That will end up yucky.Īpple tried for a while to get people to migrate to Java and Ruby away from Objective-C. Further, you don’t want C to call Python or Java code. There is quite a lot of glue code which needs to be written. Java and Python, for instance, can call C code, but that does not make them drop-in replacements for C. We could also add the multitude of transpilers (source-to-source compilers) which exist for JavaScript, such as TypeScript.Īll these languages are designed for tight integration with another language, beyond just having some barebones foreign function interface. Similar memory management model and binary interface. Elixir - Language with Ruby syntax on top of the Erlang Virtual Machine, allowing you to reuse Erlang code effortlessly.Surprising number of syntactic similarities with Swift. Kotlin - A JVM language which integrates smoothly with Java.Swift - A language implemented on top of the Objective-C runtime with modern type safety and functional programming support.Here are some of the languages combinations which are examples of this approach: Basically, that means that the new language keep important semantics from the legacy language, so you can easily reuse all existing code. I will not repeat the typical press release stuff, but focus instead on what I think about this new language from Google.Ĭarbon is following in a trend in programming we have seen play out multiple times now, which is to take an established industry language and make a modern version of it with minimal impedance mismatch. THE Carbon programming language is actually some pretty cool news! An early experimental version just got dropped recently on the 19th of July 2022.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |