Announcement

Collapse
No announcement yet.

Even Apple Is Interested In Migrating Their C Code To Rust

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Originally posted by jaypatelani View Post
    I hoped they choose ada language
    I really wish Ada get some modern syntax make over. Unfortunately it is still a niche and only used in absolute mission critical software.

    Comment


    • #32
      Originally posted by Vistaus View Post
      And here I thought Apple was putting all their money on Swift, which they created...
      I always felt Swift was wrong or skeptical of it from the moment Chris Lattner said the language was suppose / aim to take on anything from C all the way to Javascript.
      Not only is it a tall order, I also thought it was unrealistic.

      Apple Pay is hiring as well for their work on many new function, and strictly Objective-C.

      Something about Swift smells / felt very similar to Dylan, which was created after Steve Jobs left in an effort to create the next generation Prefect Programming language. All while NeXT picked up objective C.

      5 years after its introduction Swift still felt very much unfinished.

      Comment


      • #33
        They could always use java, it would be a heavenly marriage of two greedy corps apple and oracle. Why don't they use java ? Oh because they can't control it and are afraid to get lawyer beatings from oracle.

        Comment


        • #34
          Read A C# programmer examines Rust - Part 1 , the author raves about Rust.

          Comment


          • #35
            Originally posted by kpedersen View Post

            This is a critical "flaw" in all other languages. Not being C makes a language annoying for systems development because we need to either write our own bindings, or drag in a dependency on someone elses bindings (often out of date and unmaintained).

            C++ and Objective-C are the closest because they are C (mostly); and they extend it. Then I just need to write thin safety (RAII) wrappers.

            If Rust could directly consume C headers and link against C libraries; it would be a game changer.
            Then it wouldn't be Rust, but C dialect. There is C2Rust translation utility that works pretty well in many cases and can be used as a first, automated step in translation.

            One of the features of Rust is no friggin header files and declarations that one would have to repeat and check.


            Comment


            • #36
              Originally posted by Brane215 View Post

              Then it wouldn't be Rust, but C dialect. There is C2Rust translation utility that works pretty well in many cases and can be used as a first, automated step in translation.

              One of the features of Rust is no friggin header files and declarations that one would have to repeat and check.

              My understanding is that C2Rust is for converting C codebases into Rust, not for linking against libraries that will remain in C. That's why I pointed to bindgen.

              Comment


              • #37
                Originally posted by skierpage View Post
                Read A C# programmer examines Rust - Part 1 , the author raves about Rust.
                Yep, Rust is awesome regarding performance. Probably the fastest language, which provides safe (no dangling pointer) memory access guarantee, plus extra, provides no data race guarantee. And, Rust has got also great syntax and semantics.

                Yet, Rust doesn't replace C#/Java, which have fully automatic memory management, which requires (almost) zero programmer's assistance. In that genre of languages, golang (when/if/after it gets generics) is the future.

                Comment


                • #38
                  Originally posted by kravemir View Post

                  Yep, Rust is awesome regarding performance. Probably the fastest language, which provides safe (no dangling pointer) memory access guarantee, plus extra, provides no data race guarantee. And, Rust has got also great syntax and semantics.

                  Yet, Rust doesn't replace C#/Java, which have fully automatic memory management, which requires (almost) zero programmer's assistance. In that genre of languages, golang (when/if/after it gets generics) is the future.
                  Gonna call a big X to doubt on that one. Go had some initial popularity due to being from Google and being partially designed by Ken Thompson, however interest in the language is almost dead at this point because it's basically garbage collected C with interfaces, which isn't something anybody actually really wants. Beyond that it really only has traction in the sense that Ruby and PHP have traction, where it's used for the niche of server side development for web applications and even then companies like Discord are abandoning Go for Rust https://blog.discordapp.com/why-disc...t-a190bbca2b1f

                  Meanwhile Java has mobile development on lockdown and much of the enterprise market because of the legacy of Google and Sun Microsystems, and C# is actually everywhere from game development, to mobile, to enterprise development because it's one of the most pleasant languages to write code in. Enterprises aren't going to suddenly rewrite their code in Go and only Google or some as yet unseen competitor that knocks them out can decide what the language of mobile development is. And C# is more than web... so we can cross that off too.

                  Now as to whether Rust is a competitor to those... I also disagree... Like Java and C# (as well as C++), Rust was designed as a general purpose programming language that is capable of handling big architecture design. Being able to write code in a sane manner that gets up to hundred of thousands or millions of lines of code is necessary to be a competitor to C# or Java. Rust has that, Go doesn't, and that's really the big draw of those two languages. Now Rust will not take over mobile and thus Rust cannot be a competitor in that field, but bearing in mind that companies like Microsoft https://msrc-blog.microsoft.com/2019...st-in-windows/ , Apple, and Google are toying with Rust in various faculties, and that Rust is an exceedingly popular language with developers do not be surprised if the Enterprise Market shifts in Rust's direction for new development. Being safe and easy to write large programs in, not "omg it has a garbage collector" was Java and C#'s original draw for that market, and that would be the vector Rust would ride too.

                  Comment


                  • #39
                    Originally posted by Luke_Wolf View Post

                    Gonna call a big X to doubt on that one. Go had some initial popularity due to being from Google and being partially designed by Ken Thompson, however interest in the language is almost dead at this point because it's basically garbage collected C with interfaces, which isn't something anybody actually really wants. Beyond that it really only has traction in the sense that Ruby and PHP have traction, where it's used for the niche of server side development for web applications and even then companies like Discord are abandoning Go for Rust https://blog.discordapp.com/why-disc...t-a190bbca2b1f

                    Meanwhile Java has mobile development on lockdown and much of the enterprise market because of the legacy of Google and Sun Microsystems, and C# is actually everywhere from game development, to mobile, to enterprise development because it's one of the most pleasant languages to write code in. Enterprises aren't going to suddenly rewrite their code in Go and only Google or some as yet unseen competitor that knocks them out can decide what the language of mobile development is. And C# is more than web... so we can cross that off too.

                    Now as to whether Rust is a competitor to those... I also disagree... Like Java and C# (as well as C++), Rust was designed as a general purpose programming language that is capable of handling big architecture design. Being able to write code in a sane manner that gets up to hundred of thousands or millions of lines of code is necessary to be a competitor to C# or Java. Rust has that, Go doesn't, and that's really the big draw of those two languages. Now Rust will not take over mobile and thus Rust cannot be a competitor in that field, but bearing in mind that companies like Microsoft https://msrc-blog.microsoft.com/2019...st-in-windows/ , Apple, and Google are toying with Rust in various faculties, and that Rust is an exceedingly popular language with developers do not be surprised if the Enterprise Market shifts in Rust's direction for new development. Being safe and easy to write large programs in, not "omg it has a garbage collector" was Java and C#'s original draw for that market, and that would be the vector Rust would ride too.
                    Rust is definitely great language to write system applications/daemons in. More or less, it's useful for everything that is written once, and then used always/regularly on many (thousands or more,...) computers. Also, it's interesting option for heavy-load web services, when stable low latency (without spikes) is desired.

                    However, Rust is not suitable for market, when there's implemented client's specific business/view logic, as that market goes for lowest development costs, which produce well usable outputs. So, we can rule out Rust from that market.

                    Currently, that market is dominated by Java and C#, and also by other scripting languages,... Golang is currently the most used language, which beats Java and C# regarding HW resources usage, and still offers the easiest way to manage memory (GC - requires almost zero programmer's assistance, ie. just don't have any unused memory still reachable from any thread). If golang gets generics, and there won't be any comparable language (regarding HW use) until then,... Then I bet, that golang is the future for web/backend in market delivering client's specific solutions.

                    Well,... the market for client's specific web solutions would split, based on architects tastes,... Java and C# allows to easily create lots of spaghetti coupling, which can't be seen, but brings projects down over-time. In golang, spaghetti coupling is much more visible, and goes for better long-term maintainability of project.

                    Of course,... when client's business heavily grows (happens maybe for one company out of tens of thousands), then rewrite in Rust definitely makes sense, if stable low latency (response time) is desired.

                    Yet, there's still no viable alternative to java / C# for mobile applications,...

                    Comment


                    • #40
                      Originally posted by kravemir View Post
                      Rust is definitely great language to write system applications/daemons in. More or less, it's useful for everything that is written once, and then used always/regularly on many (thousands or more,...) computers. Also, it's interesting option for heavy-load web services, when stable low latency (without spikes) is desired.
                      It's basically a good language for everything other than scripting and things involving graphs with cycles.

                      Originally posted by kravemir View Post
                      However, Rust is not suitable for market, when there's implemented client's specific business/view logic, as that market goes for lowest development costs, which produce well usable outputs. So, we can rule out Rust from that market.
                      I'm not sure I understand what you're trying to get at. Once you get your head around the borrow checker, Rust isn't really any slower of a language as far as development time goes vs Java, and if you're talking about the cost of hiring a Rust developer... well... a C# Developer starts at ~$80k/year for doing web development and there's plenty of positions going up to like $110k, so... If it's something else you're going to have to clarify

                      Originally posted by kravemir View Post
                      Currently, that market is dominated by Java and C#, and also by other scripting languages,... Golang is currently the most used language, which beats Java and C# regarding HW resources usage, and still offers the easiest way to manage memory (GC - requires almost zero programmer's assistance, ie. just don't have any unused memory still reachable from any thread).
                      You're placing way too high a value on garbage collection. The days of manually futzing around with memory are over even in C++, don't need a garbage collector for that. Rust's ownership model takes care of memory to the same degree a garbage collector would, minus the overhead, and that scripting languages suck isn't really a point in Go's favour.

                      Originally posted by kravemir View Post
                      If golang gets generics, and there won't be any comparable language (regarding HW use) until then,... Then I bet, that golang is the future for web/backend in market delivering client's specific solutions.

                      Well,... the market for client's specific web solutions would split, based on architects tastes,... Java and C# allows to easily create lots of spaghetti coupling, which can't be seen, but brings projects down over-time. In golang, spaghetti coupling is much more visible, and goes for better long-term maintainability of project.

                      Of course,... when client's business heavily grows (happens maybe for one company out of tens of thousands), then rewrite in Rust definitely makes sense, if stable low latency (response time) is desired.
                      Eh... usually the complaint is that C# and Java applications are too decoupled, with overuse of dependency injection (in order to serve the purposes of testing), layers upon layers of interfaces, and general code explosion not the reverse. With the other major complaint usually being that people who don't actually understand OOP, writing code that's not actually OOP by misusing inheritance.

                      Additionally Go's implementation of the Interface concept isn't all that wonderful, and has the same fundamental issue as Java's due to (like most problems with the language) being too simple, whereas C# and Rust neatly sidestep the problem of method name collision in interfaces by tracking what's being implemented.

                      Originally posted by kravemir View Post
                      Yet, there's still no viable alternative to java / C# for mobile applications,...
                      Java really, but yes. Granted you can use Xamarin with C# and Qt with C++, as well as a few other things, but Java is really the language de jure for Android which is really the only platform that matters in mobile.

                      Comment

                      Working...
                      X