Rust Programming Language Reaches 1.0 Alpha
c0d3g33k writes: Rust, a new a systems programming language with a focus on safety, performance and concurrency, has released the 1.0 alpha version of the language. This means that the language and core libraries are feature-complete for the 1.0 release. In practical terms, this means that the rate of change experienced by early adopters will slow down dramatically and major breaking changes should be very rare (during the alpha cycle some major changes may still occur if considered necessary). The language will stabilize further when the beta stage is reached (planned for six weeks from now).
I'm a bit Rusty on the subject. Pardon?
Just the other day I was remarking how few programming languages there are.
I think you gave the primary reasons there.....a bit of a learning curve, and not as powerful as Photoshop.
"First they came for the slanderers and i said nothing."
Everyone uses "golang" due to this. It works fine.
Maw! Fire up the karma burner!
A safety systems programming language sounds great but they had to ruin it by putting a garbage collector in it. This makes it useless for systems programming.
No they didn't: http://doc.rust-lang.org/compl...
I have been using rust during development and eagerly awaited this release. Please be warned, however, that rust has a steeper learning curve than most languages, and be especially warned that the language has been changing faster than the documentation can keep up during the push towards alpha. Last I checked, even things as core as the names of the integer types differ between the documentation and the implementation. I want people to get excited about the language, but I don't want anyone to get an unnecessarily bad initial impression!
Rust is specifically not designed to be a "meets all your needs" language. It's a language that knows its niche well, and sticks to it.
Basically, this is programming language for systems and other low-level stuff done right. It competes primary against C++, and to a lesser extent, C, and does it really well. It's not yet another scripting language for the web or desktop GUI or some such, and it doesn't pretend to be one.
I'm not completely sold on the syntax, but I find the design and runtime interesting. I'd like to find an excuse to build something with it, to see if it can live up to its potential.
I started thinking about how I would design a language recently, then I came across rust, and I saw quite a lot of the same conclusions I came to myself. Abstract classes, multiple inheritance, Interfaces with versioning, combining 3rd party libraries... With rust, you define the layout of memory without inheritance, and the implementation of interfaces for types without defining the layout of memory. Neatly side-stepping some of the issues faced by other languages.
All resources and object lifetimes are managed, avoiding .NET's IDisposable. You can combine structures together, which can exist exclusively on the stack, avoiding the "everything is an object on the heap" problem that Java seems to fall into.
Since there's no NULL, there's no NullPointerException. There's no unchecked exceptions, or any exceptions at all for that matter. Though, I might prefer to have them. Sure, there's the try! macro. But that's just syntactic sugar for checking the return code of every function.
09F91102 no, 455FE104 nope, F190A1E8 uh-uh, 7A5F8A09 that's not it, C87294CE no. Ah! 452F6E403CDF10714E41DFAA257D313F.
http://zinc.rs/
Mada mada dane.
From your link:
How many good OO language exist without constructors? Maybe only javascript. This seems like a terrible decision.
Or maybe an informed one. Go and Rust -- objects without class
Besides, Rust isn't an "OO" language. It's a multi-paradigm language that supports pure-functional, concurrent-actor, imperative-procedural, and object-oriented styles. After 40+ years, a growing opinion seems to be that pure OOP isn't without its problems, and other approaches may fit development goals better. I'm not sure multi-paradigm languages are the answer (there seems to be a huge potential to be confusing, IMHO), but OOP isn't the evolutionary pinnacle of language design that the last few decades of hype would have us believe. I'm willing to give this approach a chance (and I'm always up for learning something new).
Critcisim of the OOP paradigm
(Aside: Not quite sure why, but the use of the term "paradigm" multiple times makes me feel slightly icky for some reason. Probably due to it's misuse in business jargon.)
Objective-C and Smalltalk also don't have constructors in the language, they merely have them as conventions in the standard libraries, which are adopted by most third-party code. There's no reason for constructors to be special, they're just methods that initialise the object and return a pointer / reference to it, and which (by API contract) may have undefined behaviour if used on an already initialised object.
I am TheRaven on Soylent News
This Rust language is yet another flashy thing that will not get anywhere.
That remains to be seen. I've heard the same thing said about email, the internet, Linux, Java, the iPhone, tablets and many other things over the years. The truth is that in a viable and vibrant marketplace of ideas, many things fail but some survive, and predicting which is hard. Give it a chance to fail or succeed on its own rather than condemning it in the womb, and be glad you live in a time where people have the enthusiasm and energy to try new things. Your attitude leads to stagnation.
The "guide" and the "guides", recently merged into "the book", actually are professionally maintained by a Mozilla employee, who is doing a great job but is of course outnumbered by the rest of the devs making language changes. Among other things, "alpha" is a chance for him, not to mention writers of external libraries, to get fully caught up with the development branch before beta and eventually 1.0.
The worst criticism IMO from your link is the "study by Potok et al. has shown no significant difference in productivity between OOP and procedural approaches." That's really depressing.
"First they came for the slanderers and i said nothing."
I have a student doing a miniproject (coursework for the MPhil compilers course, not his MPhil project) to implement this for Julia so that it can perform polyhedral loop next optimisations in code that's bounds checked. The basic approach is very simple: you hoist the bounds checks out and insert a single check for the largest bound and a branch on the result. If that check passes, you jump to the original loop, otherwise you fall through to a clone of the loop with all bounds checks removed. The compiler can optimise this aggressively, because it has few branches in it. You statically predict that branch as not-taken and ensure that the cold path (where a bounds check will fail - you're going to be doing expensive and slow things on that path anyway, so you don't care if it's slow) is emitted somewhere where it won't pollute your cache (you can even outline it as a new function and put it on a different page so you it won't be pulled from disk unless you hit it).
The only time that this is a problem is if another thread is able to change the length of the array. Rust makes it easy to statically check that this is not going to happen. Changing a language to make life easier for compilers based on 20-year-old designs is never something that I'd recommend.
I am TheRaven on Soylent News
Type inference frees one from the boilerplate of, say, Java while maintaining static typing. You still get type safety in compilation.
It's the basis of functional languages such as ocaml and haskell.
Have a read about Damasâ"Hindleyâ"Milner typing.