Re: [rust-dev] Questions on language tutorial

2013-02-26 Thread Patrick Walton
On 2/26/13 5:25 PM, Nathan Fiedler wrote: Hello all I was reading the language tutorial and had a couple of questions. I hope this is the appropriate forum for asking them. In section 4.1 the example has "return 0", seemingly as an expression. Is that correct usage? Should it not simply be "0"

[rust-dev] Questions on language tutorial

2013-02-26 Thread Nathan Fiedler
Hello all I was reading the language tutorial and had a couple of questions. I hope this is the appropriate forum for asking them. In section 4.1 the example has "return 0", seemingly as an expression. Is that correct usage? Should it not simply be "0" instead? Section 5.3 describes tuples and t

Re: [rust-dev] I wanted a dollar but you gave me a ... dollar?

2013-02-26 Thread Graydon Hoare
On 13-02-24 12:06 PM, Ashish Myles wrote: > On Sun, Feb 24, 2013 at 3:03 PM, Ashish Myles wrote: >> >> Wait a sec...I guess we are barking up the wrong tree. The problem is >> not that rust macros don't support $n:integer, but that static array >> initialization seem to require a raw integer lite

Re: [rust-dev] I wanted a dollar but you gave me a ... dollar?

2013-02-26 Thread Paul Stansifer
> More or less as a note to myself and Paul: I claim that this problem > would be solved by a token-tree-based macro system. There's another consequence of a such a macro system related to this: You could write `[T * some_macro!(...)]`, but only on the right-hand side of a macro definition.

Re: [rust-dev] Warning: region syntax changes progressing

2013-02-26 Thread Sanghyeon Seo
> - you can now use the 'foo lifetime notation, though you don't have to > (emacs users, if you update your emacs-mode the syntax highlighter will > recognize 'foo. vi users, you're on your own). Once we do a snapshot, > the 'foo notation will become mandatory. (Note: within the compiler, you > s

[rust-dev] Warning: region syntax changes progressing

2013-02-26 Thread Niko Matsakis
Hello, Once I finish up my latest pull request, the first non-backwards-compatible steps toward the new lifetime syntax will be in place. I'll try to send a mail for each change that requires modifying source code. Note: since the pull request hasn't landed yet, the changes I describe below a

Re: [rust-dev] troubles to use vec::filter() when pattern matching a vector

2013-02-26 Thread Niko Matsakis
Use vec::filtered().  vec::filter() works only on ~[T] and consumes its argument (so you cannot use it again) and vec::filtered() does not. This naming convention is probably too subtle and is also not entirely consistent across vec functions. Niko Peter Ronnquist Febru