Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The focus on C++ as point of comparison is understandable given Mozilla's background, but in Internet land most systems software runs on the JVM, and is written in Java, or increasingly, Scala (see LinkedIn and Twitter, for example).

The issues of memory layout and the like come up here, and unlike Rust the JVM doesn't give much control of this aspect. See Martin Thompson's blog for an example of someone very concerned with issues of performance on the JVM (http://mechanical-sympathy.blogspot.co.uk/) I believe Rust could see a lot of adoption within this community as a "better" Scala -- a modern high-level language that allows dropping down to bit-twiddling when performance is an issue. It needs higher kinded types before it will work for me, but I hear that is on the road-map.

BTW, I've read a few Rust tutorials and they all fail for me in the same way: too much waffle and not enough getting down to the details. I understand the difference between stack allocation, reference counting, and GC, I get why shared mutable state is a bad idea, etc. What I want is a short document laying out the knobs Rust provides (mutable vs immutable, ownership, allocation) and how I can twiddle said knobs.



but in Internet land most systems software runs on the JVM, and is written in Java

[[Citation needed]].

The Internet land I've lived in mostly lives in C with a smattering of non-JVM scripting languages (Python, Ruby, PHP, etc) on top.


It's probably more accurate to say that in the Enterprise most software is running on the JVM. But there are certain (large) internet companies that have significant system software running on the JVM (Google, Twitter).


I think that's totally true. It's not just so much because of Mozilla, but also because Rust is probably closer to C++ than Java...

The official tutorial contains much of that information.


Funnily, I see at being closer to Scala than either C++ or Java. I think it all comes down to background.

The official tutorial isn't very good on issues of memory management. The first mention of managed references (I assume that means GCed) is in an example in section 11. Nowhere does it actually explain what managed means (and if I missed it, I blame the tutorial for not making it explicit enough!)


Yeah, so the syntax for managed references was removed, yet some of it lingers in the docs. I'll make a note to clean that up.

The official tutorial is really bad but at least has a large bulk of information. I'd love to re-write it, but I haven't had the time.

(And it was more reference counted than actually garbage collected: now we have Rc<T> and Gc<T> for both strategies.)


(GC<T> still uses @ internally; i.e. it's reference counting and not garbage collection too. This will be fixed.)


Well that's the thing, while Rust occupies the same space as C++, but it doesn't just take its inspirations from there. It also takes it from functional languages like ML or Haskell (the compiler was originally written in OCaml).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: