LWN: Comments on "Mozilla and Samsung building a new browser engine" http://lwn.net/Articles/545716/ This is a special feed containing comments posted to the individual LWN article titled "Mozilla and Samsung building a new browser engine". hourly 2 Rust http://lwn.net/Articles/546362/rss 2013-04-08T01:58:09+00:00 roc <div class="FormattedComment"> Rust isn't designed to be "a better C++". It's designed to provide features C++ doesn't have:<br> -- Type/memory safety guarantees<br> -- Parallel programming with a guarantee of no data races (primarily by enforcing "no mutable shared memory")<br> -- Lightweight isolated tasks as a unit of failure<br> <p> Developers who don't want those things should stick to C++. Developers who want all those things can't get them from C++ and should consider Rust, among other alternatives. Developers who want those things in a language which is as close as possible to C++ in performance should strongly consider Rust.<br> </div> Rust http://lwn.net/Articles/546347/rss 2013-04-07T21:50:26+00:00 HelloWorld <blockquote>The restrict keyword, by itself, does not add some opportunities for loop unrollings where aliased things are used inside the loops.</blockquote> I don't understand that, can you give an example? <blockquote>The lack of defining pure functions, without side-effects, also elide some opportunities for repeated code removal.</blockquote> Modern optimising compilers try to figure out whether a function is pure and optimise accordingly. Example: <pre> #include &lt;stdio.h&gt; int sq(int i) { return i*i; } int main(int argc, char **argv) { int i = strtol(argv[1], 0, 0); printf("%d\n", sq(i) * sq(i)); return 0; } </pre> Compiled with <code>gcc -O3 -fno-inline-small-functions -S -masm=intel</code> (gcc 4.7.2) this yields <pre> ... call strtol mov edi, eax call sq imul eax, eax mov edi, OFFSET FLAT:.LC0 mov esi, eax xor eax, eax call printf ... </pre> So gcc sees that <code>sq</code> is a pure function and only calls it once, even though it's called twice in the source code. Granted, this isn't quite the same as in Fortran as the compiler needs to be able to see the definition of the relevant function for this to work. But due to link-time optimisation this isn't as big a limitation as it used to be. I'm not convinced the Fortran way offers significant benefits in the real world. Rust http://lwn.net/Articles/546338/rss 2013-04-07T18:11:30+00:00 mathstuf <div class="FormattedComment"> GCC does have a pure attribute, but it's not verified that you're using it properly and no one uses it anyways…<br> </div> Rust http://lwn.net/Articles/546336/rss 2013-04-07T18:08:34+00:00 hummassa <div class="FormattedComment"> The restrict keyword, by itself, does not add some opportunities for loop unrollings where aliased things are used inside the loops.<br> <p> The lack of defining pure functions, without side-effects, also elide some opportunities for repeated code removal.<br> </div> Rust http://lwn.net/Articles/546335/rss 2013-04-07T17:59:21+00:00 mathstuf <div class="FormattedComment"> So, in Haskell, because pure functions are guaranteed to not modify data, the compiler is allowed to "fuse" operations[1] instead of doing exactly what a naïve reading of the code implies (strict order of expressions to be evaluated). This allows the simple map function to act like C++'s std::transform and optimize the specific calls being made (usually via inlining then optimization), but GHC can optimize the calls on a single data structure being operated on across function boundaries and fuse the map calls together ((map (f . g)) list rather than (map f . map g) list where map f and map g are in different functions). I don't think C++'s std::transform gets optimized like this (and even if it did, f and g can't necessarily be called gfgfgf rather than gggfff).<br> <p> [1]This is how Eigen gets a lot of performance: by storing expressions instead of evaluating additions immediately, Eigen can merge loops together to get one loop with 3 operations in it rather than 3 loops with one operation each which wins on cache access and in hot loops, matters a lot.<br> </div> Rust http://lwn.net/Articles/546326/rss 2013-04-07T15:10:02+00:00 HelloWorld <div class="FormattedComment"> <font class="QuotedText">&gt; A Fortran compiler is allowed by the language definition to make all sorts of assumptions that are unavailable to a C compiler.</font><br> What assumptions? The one that people keep bringing up (pointer aliasing issues) was fixed a long time ago with the restrict keyword.<br> <p> <font class="QuotedText">&gt; In addition, direct translation of Fortran source code to C (and vice versa) usually leads to significantly worse performance in the new language if arrays are involved, simply because Fortran assumes that arrays are stored in row-major order while C assumes a column-major arrangement.</font><br> How is that supposed to matter? Whether row-major or column-major arrangement is faster depends entirely on the access patterns in the relevant program, and besides that, you're free to use a column-major layout in C as well, you just have to calculate indices by hand.<br> </div> Rust http://lwn.net/Articles/546323/rss 2013-04-07T14:13:03+00:00 HelloWorld <div class="FormattedComment"> What specific optimisation opportunities are you talking about? The ones everybody knows about are related to pointer aliasing, but the restrict keyword has been around for ages now.<br> </div> Rust http://lwn.net/Articles/546324/rss 2013-04-07T14:04:10+00:00 anselm <p> A Fortran compiler is allowed by the language definition to make all sorts of assumptions that are unavailable to a C compiler. This gives a Fortran compiler room for various optimisations that a C compiler can't do to the same degree. This means that for the typical sort of program one would write in Fortran, a Fortran compiler is at a distinct advantage compared to a C compiler as far as optimisation is concerned. On the other hand, C allows you to write programs with reasonable ease that can't be conveniently expressed at all in Fortran (one notable example being the Linux kernel). </p> <p> In addition, direct translation of Fortran source code to C (and vice versa) usually leads to significantly worse performance in the new language if arrays are involved, simply because Fortran assumes that arrays are stored in row-major order while C assumes a column-major arrangement. In a speed comparison of programs written in both languages, factors like these ought to be controlled for. </p> Rust http://lwn.net/Articles/546314/rss 2013-04-07T12:19:38+00:00 hummassa <div class="FormattedComment"> You are being a purist.<br> <p> When people say things "C is slower than C++" or "C is slower than Fortran" or "C is slower than Haskell" they actually mean "C offers less opportunities for the compiler and the standard library implementations to optimize many types of constructions in code, mainly because of loose typing rules and loose aliasing rules. When you set out to execute a task computationally complex enough, you have a great probability that a well-written program in C will be slower than a well-written program in FORTRAN, or Haskell, or C++".<br> </div> Rust http://lwn.net/Articles/546310/rss 2013-04-07T11:27:49+00:00 HelloWorld <div class="FormattedComment"> <font class="QuotedText">&gt; C is slow, too, slower than Fortran</font><br> Programming languages aren't fast or slow, programs are.<br> <p> Case in point: the benchmarks game.<br> <a rel="nofollow" href="http://benchmarksgame.alioth.debian.org/u32/benchmark.php?test=all&amp;lang=ifc&amp;lang2=gcc">http://benchmarksgame.alioth.debian.org/u32/benchmark.php...</a><br> <p> In some cases, the C program is faster, in others the Fortran one is faster. "faster than" is simply not a total order on the set of programming languages, so stop making it sound as if it were. It's meaningless and undifferentiated. <br> </div> Rust http://lwn.net/Articles/546300/rss 2013-04-07T05:25:00+00:00 mathstuf <div class="FormattedComment"> <font class="QuotedText">&gt; Once the working set no longer fits in L3 cache, the Haskell implementation is even neck-and-neck with the implementation of ddotp from GotoBLAS, a collection of highly-tuned BLAS routines hand-written in assembly language that is generally consid- ered to be one of the fastest BLAS implementation available.</font><br> <p> The authors didn't only compare with C.<br> </div> Rust http://lwn.net/Articles/546298/rss 2013-04-07T05:03:14+00:00 ncm <div class="FormattedComment"> C is slow, too, slower than Fortran, so it's not a good standard for comparison. <br> </div> Rust-lang http://lwn.net/Articles/546272/rss 2013-04-06T16:38:15+00:00 HelloWorld <div class="FormattedComment"> Yeah, I know, people confuse + and ++ in C all the time. Oh wait: they don't!<br> </div> Rust http://lwn.net/Articles/546257/rss 2013-04-06T13:34:23+00:00 mathstuf <div class="FormattedComment"> <font class="QuotedText">&gt; Haskell is powerful but slow</font><br> <p> Huh? Maybe in specific cases where laziness can bite you or you write your calls poorly, but Haskell *can* beat C. In this[1] paper (reddit[2] discussion), on how to get GHC to use SSE for fused inner loops, Haskell is beat by Eigen's optimized calls and Boost's uBLAS library (but Boost only when you work with &gt; L3-sized data). The C code would need careful tuning to take care of the same optimizations. And GHC hasn't really even been "optimized" for the call in particular; it's just an instance of the optimizer at work on a single, fairly naïve writing of the code.<br> <p> [1]<a href="http://research.microsoft.com/en-us/um/people/simonpj/papers/ndp/haskell-beats-C.pdf">http://research.microsoft.com/en-us/um/people/simonpj/pap...</a><br> [2]<a href="http://www.reddit.com/r/programming/comments/1bs0p3/haskell_beats_c_using_generalised_stream_fusion/">http://www.reddit.com/r/programming/comments/1bs0p3/haske...</a><br> </div> Rust-lang http://lwn.net/Articles/546256/rss 2013-04-06T13:24:59+00:00 gevaerts <div class="FormattedComment"> <font class="QuotedText">&gt; you've confused ::: and ::</font><br> Are you sure you're making the point you're trying to make?<br> </div> Rust-lang http://lwn.net/Articles/546228/rss 2013-04-06T00:26:08+00:00 HelloWorld <div class="FormattedComment"> <font class="QuotedText">&gt; So imagine a case where both branches are different.</font><br> That's a type error in itself in most cases. In order for such code to typecheck, the branches' types must have a common supertype. As far as I can see, Rust allows only interfaces to form hierarchies, and I don't know if it's even possible for () to implement interfaces. But even if it is, this situation is going to be so rare that it's not worth losing any sleep over it.<br> <p> </div> Rust-lang http://lwn.net/Articles/546222/rss 2013-04-05T22:47:22+00:00 jimparis <div class="FormattedComment"> <font class="QuotedText">&gt; It doesn't matter whether the branch can be taken, the values of both branches are of type ()</font><br> <p> So imagine a case where both branches are different. Or where the conditional is deep inside a function before the return value finally gets to the assignment. If having a conditional return type () makes sense in some cases and not others, then you can't trivially warn about it.<br> </div> Rust-lang http://lwn.net/Articles/546218/rss 2013-04-05T22:18:48+00:00 HelloWorld <div class="FormattedComment"> <font class="QuotedText">&gt; A runtime warning? It's hardly trivial at compile time when the compiler might not even know if a branch can be taken.</font><br> It doesn't matter whether the branch can be taken, the values of both branches are of type (), and it doesn't make sense to store a value of that type in a variable.<br> <p> </div> Rust-lang http://lwn.net/Articles/546182/rss 2013-04-05T17:01:04+00:00 jimparis <div class="FormattedComment"> A runtime warning? It's hardly trivial at compile time when the compiler might not even know if a branch can be taken.<br> </div> Rust http://lwn.net/Articles/546162/rss 2013-04-05T15:00:57+00:00 tjc <div class="FormattedComment"> I work in bioresearch, and we use Java for almost everything. That's not the decision I would have made, but that's the trend. Nearly all the organizations we work with use Java, so it's hard to resist.<br> <p> We used to use C and Perl, which was a common combination in bioinformatics, but that's been fading away -- especially C, I am sorry to say.<br> <p> </div> Rust-lang http://lwn.net/Articles/546113/rss 2013-04-05T12:54:10+00:00 HelloWorld <div class="FormattedComment"> It is trivial to add a warning for that. Just check if a local variable is bound to a value of type (). <br> </div> Rust-lang http://lwn.net/Articles/546106/rss 2013-04-05T12:39:02+00:00 renox <div class="FormattedComment"> Yes, in Rust you have to be very cautious about the usage of ';'!<br> Thankfully as the return type of functions is not inferred but given explicitly in many cases the compiler will be able to complain, not in the example you've given though.<br> <p> Apparently they don't like 'return', I'm not sure why.. Maybe it's because it's 'big' (they seem to like short keyword)?<br> In this case, they could have done like SmallTalk use '^' instead of return.<br> <p> Another weird part is the for: 'for v.each |e| { bar(*e);}', uh?<br> The languages I know use either for (for e in set { .. }' or each (set.each |e| { .. }) but having both for AND each at the same time??<br> <p> Also code with named lifetime seems really hard, but I don't think that's a syntax issue, it's just a difficult concept to master.<br> <p> </div> Rust http://lwn.net/Articles/546093/rss 2013-04-05T08:38:51+00:00 ncm <div class="FormattedComment"> Yes, Fortran is still used heavily in certain domains, but no longer because it is, as it once was, the only reasonable choice. Nowadays its continued use is more a matter of inertia than of technical merit.<br> <p> You seem to be asserting that C++ will always be the only reasonable choice for those difficult problems where there is, at this moment, no other. People used to say that about Fortran. They were wrong too.<br> <p> That's not to say that Rust (or its descendant, TiN?) really will be the new heavy. What is certain is that there will someday be a new heavy that is not C++XX. Furthermore, it will differ from C++ in many of the ways that Rust does.<br> <p> </div> Rust-lang http://lwn.net/Articles/546089/rss 2013-04-05T08:21:58+00:00 dgm I don't find those much problematic, but go read the <a href="http://static.rust-lang.org/doc/tutorial.html">tutorial</a>, and in section 3.1 you will find that: <pre> let var = if (condition1) { value1 } else { value2 }; </pre> is completely different from: <pre> let var = if (condition1) { value1; } else { value2; } </pre> <p>The second one would be almost surely a mistake, but the compiler would not complain. In my opinion this defeats the purpose of doing Yet Another Curly Brace Language. The mere fact that they feel they need to point it out in the tutorial is a clear sign that something is wrong here. <p>I hope they get this sorted out before 1.0 Rust http://lwn.net/Articles/546086/rss 2013-04-05T07:38:31+00:00 khim <blockquote><font class="QuotedText">You clearly haven't seen the number of large enterprise projects switching from C++ to Java in 90s and early 2000-s.</font></blockquote> <p>Yes, I have seen these failures. What about them? Sure, with well-oiled PR machine you can convince pointy-haired bosses to adopt basically anything and because they can not admit that they goofed up failures are often presented as successes (Elop is undisputed leader here, but he's not the only one). In any case they are mostly about hype: systems written in Cobol, Pascal, dBase and other similar languages are often still used even when bosses think they operate pure Java (or C#) shops.</p> <p>IOW: if anything "the big switch of enterprise to Java and C#" is nothing but smoke and mirrors. PR achievement at best.</p> Rust http://lwn.net/Articles/546085/rss 2013-04-05T07:32:16+00:00 khim <blockquote><font class="QuotedText">Subsequent Fortran releases are more or less backward-compatible, and recent ones even support pointers and recursion, but how many places are they used?</font></blockquote> <p>In more places then you expect. I know few people who thought like you do till they actually participated in bioresearch, weather prediction research and so on. They found out to their sudden surprise that <b>new</b> projects are still written in Fortran. Usually it's a mix: IT guys write the supplemental logic in C/C++ and non-IT scientists write their algorithms in Fortran. In that sense Fortran is still alive. Number one request for <a href="http://research.google.com/university/exacycle_program.html">Exacycle</a> is Fortran support (perhaps they already implemented Fortran support at this stage? I don't know).</p> <blockquote><font class="QuotedText">People using C++ now will continue using it, but in maybe ten years new organizations and projects that need C++'s power will begin to pick up Rust (or something) instead. Second-tier languages will come and go, and be used for the easy problems, as always.</font></blockquote> <p>And Rust in one of these second-tier languages. The same happens with other industries, too. Think <a href="http://en.wikipedia.org/wiki/Track_gauge#Dominant_gauges">track gauges</a> or <a href="http://en.wikipedia.org/wiki/QWERTY">QWERTY keyboard</a>: once upon time it was easy to change track gauges or layout of keyboard but by now it's basically impossible. You can change some auxiliary pieces (railroad ties are made today from stone, wood, plastic or even fiberglass) and specialized cases use specialized gauges or keyboards, but mainstream is stuck.</p> <blockquote><font class="QuotedText">My point is that Rust is the first language above the horizon that seems physically capable of supplanting C++ on problems where, before, nothing else could even be seriously considered.</font></blockquote> <p>Nope. Rust is yet-another-pretender with overblown hype.</p> <blockquote><font class="QuotedText">If it sputters out, the world will continue with C++ as before until the next contender matures.</font></blockquote> <p>Well, the next contender will probably be called C++17, so it's not like we'll need to wait too long.</p> Rust http://lwn.net/Articles/546059/rss 2013-04-05T07:00:40+00:00 ncm <div class="FormattedComment"> Fortran is an excellent example. Subsequent Fortran releases are more or less backward-compatible, and recent ones even support pointers and recursion, but how many places are they used? When starting a project where Fortran would have been required, people use C++ now because it's faster and more expressive. C++ has turned out to be the Glorious Successor to Fortran, despite being just barely link compatible, in the same way that FORTRAN succeeded assembly language.<br> <p> The GStC++ will not be anything that is obliged to carry forward C++'s avoidable complexities (largely, forced C compatibility, name lookup horrors). People using C++ now will continue using it, but in maybe ten years new organizations and projects that need C++'s power will begin to pick up Rust (or something) instead. Second-tier languages will come and go, and be used for the easy problems, as always.<br> <p> My point is that Rust is the first language above the horizon that seems physically capable of supplanting C++ on problems where, before, nothing else could even be seriously considered. If it sputters out, the world will continue with C++ as before until the next contender matures.<br> </div> Rust http://lwn.net/Articles/546048/rss 2013-04-04T23:11:35+00:00 HelloWorld <blockquote>(<a rel="nofollow" href="http://catb.org/jargon/html/V/Visual-Fred.html">Visual Fred</a> is <b>not</b> Visual Basic)</blockquote> I see esr still doesn't understand <a rel="nofollow" href="http://www.joelonsoftware.com/articles/Unicode.html">The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets</a>. sigh. Rust-lang http://lwn.net/Articles/546047/rss 2013-04-04T22:55:36+00:00 HelloWorld Nobody writes it that way, there's a reason why one is allowed to omit the . and the (). Also, you've confused ::: and ::. <code>qsort(rest) ::: pivot :: qsort(smaller)</code> I don't think this looks too bad. Rust http://lwn.net/Articles/546039/rss 2013-04-04T21:39:37+00:00 Cyberax <div class="FormattedComment"> <font class="QuotedText">&gt;Java is used to write huge amount of new code, that's true, but the same can be said about PHP or JavaScript and number of projects which switched from C to Java is so minuscule it's not even worth talking about.</font><br> Heh. You clearly haven't seen the number of large enterprise projects switching from C++ to Java in 90s and early 2000-s. Ditto for C# - quite a lot of software was rewritten in it.<br> <p> A good C++-like language does not NEED to be directly compatible with all braindeadness of C, it just needs to have a good FFI.<br> <p> <font class="QuotedText">&gt;Again, in the same fashion: some pieces are written in C# but amount of new C++ code does not go down at all and people rarely make conscious decision to switch from C++ to C#</font><br> And I've seen tons of these switches. People were eager to jump C++ when an acceptable alternative presented itself.<br> </div> Rust http://lwn.net/Articles/546033/rss 2013-04-04T20:42:54+00:00 khim <blockquote><font class="QuotedText">Java succeeded on mobile (Android) and on the server-side.</font></blockquote> <p>Java is used to write huge amount of new code, that's true, but the same can be said about PHP or JavaScript and number of projects which switched from C to Java is so minuscule it's not even worth talking about. Android only caught up when it allowed execution of C/C++ code and can only be counted as yet-another-failed-attempt-to-replace-C++-with-Java (or may be it was never planned as such an attempt: some people claim that NDK for Android was planned from the start and was just released later because it was not ready for Android 1.0).</p> <blockquote><font class="QuotedText">C# is very successful on Windows both on client and server side.</font></blockquote> <p>Again, in the same fashion: some pieces are written in C# but amount of new C++ code does not go down at all and people rarely make conscious decision to switch from C++ to C# (few projects did that - notably Visual Studio itself - but these are rare exceptions, not rule). If anything C# replaced Visual Basic not C++ - and that only happened because Visual Basic was brutally killed (<a href="http://catb.org/jargon/html/V/Visual-Fred.html">Visual Fred</a> is <b>not</b> Visual Basic).</p> <p>P.S. Note that I don't argue that Java and/or C# are not popular - of course they are (I don't necessarily think it's good thing, but that's irrelevant), but are they popular as "Glorious Successor to C" or "Glorious Successor to C++"? Of course not! Not even close!</p> Rust http://lwn.net/Articles/546029/rss 2013-04-04T20:29:40+00:00 khim <blockquote><font class="QuotedText">If (as it appears) Rust is as expressive as C++, equally fast, and link-compatible with C, it has a unique opportunity because it's much, much simpler than C++.</font></blockquote> <p>Nope. There are fundamental difference between these.</p> <p>To go from C to Java you need to jump over 100 feet high wall and to go from C to Haskell you need to jump over 1000 feet high wall. With Rust this wall may be 50 feet high or may be even 10 feet high, but it's still a wall and it'll keep users from defecting from C camp.</p> <p>C++? For C++ it's kinda 500 feet-high <b>staircase</b>: sure, the end position it pretty far removed from where you've started but you can go there at the pace <b>you</b> want. You can use as many or as few C++ features as <b>you</b> want - which means that <b>any</b> C programmer can become C++ programmer by learning about couple of things s/he wants/needs. Sure, s/he may not be very efficient C++ programmer, but s/he'll be a C++ programmer even the only thing s/he uses are mutex classes or something like this. Eventually C++ can replace C more-or-less everywhere (the last holdouts like binutils and gcc are slowly switching to C++ camp). Well, may be not kernel (because it uses C++-incompatible dialect of C), but even that may happen in 10 years or so. If you introduce incompatible syntax, incompatible paradigms (and insist that said paradigms must be used from the start) then substantial percentage of developers will just be kept behind the wall such changes reproduce.</p> <p>Rust may succeed as a language or it may fail but it can not be next C++. It's not in the cards.</p> <blockquote><font class="QuotedText">No language is forever. Rust might not be the true Glorious Successor to C++. If not, whatever is will look a lot like Rust.</font></blockquote> <p>I seriously doubt it. Go, Rust and other "modern" languages is not designed to be C replacement and this means that at best they'll coexist with C/C++ (at worst they'll go to the dustbin of history).</p> <p>Think another, parallel world of Pascal: it was quite popular <a href="http://en.wikipedia.org/wiki/Delphi_programming_language#Delphi_and_Free_Pascal.27s_Object_Pascal">till a few years ago</a> but it's nominal successor never actually caught up (as <b>successor</b>!) because it was incompatible. Rust is in similar position and it's not even named as "C successor" by people who designed C...</p> <p>Or another data point: Fortran. The last version which was actually incompatible with it's predecessor to significant degree was <a href="http://en.wikipedia.org/wiki/Fortran#FORTRAN_77">FORTRAN 77</a> - and it was almost enough to ruin the transition. <b>Planned</b> transition governed by most compiler vendors! And now you think that another <a href="http://en.wikipedia.org/wiki/Network_Control_Program#Transition_to_TCP.2FIP">NCP style</a> transitions will happen? Dream on.</p> Rust http://lwn.net/Articles/546028/rss 2013-04-04T20:04:27+00:00 Cyberax <div class="FormattedComment"> Java succeeded on mobile (Android) and on the server-side. C# is very successful on Windows both on client and server side.<br> <p> <font class="QuotedText">&gt;I'm talking about "next C" which means that either it replaces C as program-development language or it replaces it as OS kernel-level language. AFAIKS Java and C# both failed there. Spectacularly.</font><br> You don't need to replace C as a language for the kernel (though C# can be used even there - see Singularity OS).<br> </div> Rust http://lwn.net/Articles/546027/rss 2013-04-04T20:00:59+00:00 khim <blockquote><font class="QuotedText">Java has succeeded and so has C#</font></blockquote> <p>Rilly? Reality check: Java Applets - failure, Java ME - failure, Android - failure (it's huge success only came after NDK release), Silverlight - failure, Windows Phone - failure (Windows Phone 7.x, that is, Windows Phone 8 returned back to C - we'll see where it'll lead), where is this success?</p> <p>I'm talking about "next C" which means that either it replaces C as program-development language <b>or</b> it replaces it as OS kernel-level language. AFAIKS Java and C# both failed there. Spectacularly.</p> <p>Sure, they carved niche for itself, but so did many other languages - from VBA to PHP and Perl, but "next C"? Not even close.</p> Rust http://lwn.net/Articles/546013/rss 2013-04-04T19:06:02+00:00 ncm <div class="FormattedComment"> A language as powerful and expressive as C++ has a big advantage. Java is not, Go is not, Ruby is not. Haskell is powerful but slow, and needs an intrusive runtime environment. If (as it appears) Rust is as expressive as C++, equally fast, and link-compatible with C, it has a unique opportunity because it's much, much simpler than C++. That makes it easier to learn, and cheaper to implement and maintain, both the compiler and your own code. Given C link-compatibility, Rust modules can be added to your existing programs, and new Rust programs can call your existing libraries, offering a smooth transition path.<br> <p> No language is forever. Rust might not be the true Glorious Successor to C++. If not, whatever is will look a lot like Rust.<br> </div> Rust http://lwn.net/Articles/546007/rss 2013-04-04T18:00:42+00:00 Cyberax <div class="FormattedComment"> Java has succeeded and so has C#. And while C# has a decent FFI (Foreign Function Interface), Java only has JNI.<br> <p> So C compatibility is not essential. But having a good FFI certainly helps.<br> </div> Rust-lang http://lwn.net/Articles/546006/rss 2013-04-04T17:59:28+00:00 Cyberax <div class="FormattedComment"> Mac OS X with recent enough MacPorts. No problems at all during the build.<br> </div> Rust http://lwn.net/Articles/546004/rss 2013-04-04T17:39:28+00:00 khim <p>Why people think D, Go, Rust or some other "modern" language can replace C++? They all lack the ability to convert your program in new language piece-by-piece which means they'll have as much success trying to replace C++ and Plan9 had trying to replace UNIX.</p> <p>I can imagine new language which will start from C and will go from there (think Objective-C), but even this is not all that likely. New, incompatible one? No chances, sorry.</p> <p>Sure, we'll see some projects written in these languages, but what exactly will distinguish these from projects written in Java or, ugh, PHP?</p> Rust-lang http://lwn.net/Articles/545994/rss 2013-04-04T16:39:27+00:00 Cyberax <div class="FormattedComment"> "qsort(rest).::(pivot).:::(qsort(smaller))"<br> </div> Rust-lang http://lwn.net/Articles/545971/rss 2013-04-04T15:43:02+00:00 tjc <div class="FormattedComment"> <font class="QuotedText">&gt; I've recently tried to use Rust instead of Go for simple "scripts" and I really loved it.</font><br> <p> What OS/distro are you using? I tried to build Rust on both OS X and Linux Mint 12.04, but both failed, for different reasons.<br> <p> </div>