Live data from Hacker News

Announcing Rust 1.0 Alpha

blog.rust-lang.org

131–140 of 255 posts

Re: Announcing Rust 1.0 Alpha

#131

Being a game developer, inheritance is a really important language feature. I'm not one to abuse the power. Currently, for school I've been working on an OpenGL game engine in C++. It's a component based system. The only real inheritance situation that's important to me, is to allow the user of the engine to create any object and make it inherit from GameObject (example: Duck would inherit the members and methods fro…

> Duck would have a GameObject, rather than be a GameObject

Duck should not be a class, it should be a factory function that creates a generic GameObject and configures it with the set of components that allows it to look, walk and quack like a duck.

Re: Announcing Rust 1.0 Alpha

#132

I've been incredibly impressed by the willingness of the Rust team to take a step back and re-evaluate old decisions. I think this 1.0 release will be much better for all the iterations put into e.g. dynamically sized types and other things that never quite fit in their first half-dozen iterations of the design. Congrats all!

Thank you. Personally, I try to have strong opinions, weakly held. :)

> strong opinions, weakly held.

I like that, its mine now.

Re: Announcing Rust 1.0 Alpha

#134
post #80

Earlier quoted context omitted.

Performance is an area where Rust still has a lot of low-hanging fruit to pick, so I'm happy to hear that you managed to make your version fast. Did you have to make any design compromises to that end? We're very interested in optimizing the typical use cases.

I have currently got some bit-swizzling [1] going on to fit the concept of a Piece into u8. (one of 6 colours and one of 6 shapes). I'd like to turn this back into a nice enum if I can! Introducing laziness by writing an iterator was actually one of the biggest single improvements (I couldn't figure out the syntax for a while, but lifetimes worked much better than I was expecting)! [1]: https://github.com/iamdanfox/q…

[deleted]

Re: Announcing Rust 1.0 Alpha

#136

Wow. Anyone remembers Rust pre-0.1? When it had typestate, ML syntax, garbage collection, etc.? So nice to see how the language slowly evolved and was molded to fit as best as possible the problem they were trying to solve.

> the language slowly evolved and was molded to fit as best as possible the problem they were trying to solve.

Which is...? Wikipedia says [1]

> "to be a good language for the creation of large client and server programs that run over the Internet"

and that looks too vague to me.

[1] http://en.wikipedia.org/wiki/Rust_%28programming_language%29...

Re: Announcing Rust 1.0 Alpha

#137
post #51
post #47

Earlier quoted context omitted.

> Give me an example of any ecosystem where the standard library is the defacto best solution? In Go that's certainly the case and in my experience it's a great thing, only time will tell if it will end up suffering stagnation like maybe happened to python.

Or what happened to Java. And probably other ecosystems. IMO a "softer", "recommended" packages approach is better longer term.

Ironic that you've both picked languages that are used quite effectively, if unsexily, to solve problems. Both Python and Java are at the "plateau of productivity" - there's not a whole lot of innovation going on, but they're stable, robust, and have a large ecosystem of tools that let you get work done quickly. A good portion of this is because of the stability of a large standard library that everyone can depend upon.

Re: Announcing Rust 1.0 Alpha

#138
post #85
post #69

The one thing that would put rust over the top right now is something along the lines of gofmt - something simple, with zero configuration, that can be run on commit or even save.

indent(1) has been around for ages. Where does this sudden need for universal style goose stepping come from?

1) A lot more code isn't read in vim or emacs nowadays. We don't have the equivalent of indent on the github web ui

2) Everyone and their mother is doing code reviews now, and a lot of code reviews get (very visibly) bogged down by style disputes.

3) indent and his modern friends (eg clang-format) generally only answer trivial whitespace questions, and not even things like method capitalization. gofmt is the obvious extension of indent.

Re: Announcing Rust 1.0 Alpha

#139
post #61

Earlier quoted context omitted.

You can read up here: http://doc.rust-lang.org/book/generics.html , as well about "output" generics here: https://github.com/rust-lang/rfcs/blob/master/text/0195-asso... , and explore usage in collections here: http://doc.rust-lang.org/nightly/std/collections/ .

Are "Traits" basically C++ Concepts?

Somewhere between C++ concepts and Haskell typeclasses with a hint of Java interfaces.

But yes, their primary usage is to require that type parameters exhibit a certain set of properties.

Post reply on HN