Re: [rust-dev] Syntax sugar: Vec Rc RefCell Box Foo - VecRcRefCellBoxFoo

2014-06-29 Thread Nawfel BGH
I like it. Lets go all the way down and make `T P` an abbreviation to `TP` and `f x` an abbreviation to `f(x)` People will then start to write `f a b` instead of `f(a,b)` since unboxed closures make this possible. They will also write a macro `defun` to ease the definitions of such functions and

Re: [rust-dev] Syntax sugar: Vec Rc RefCell Box Foo - VecRcRefCellBoxFoo

2014-06-29 Thread Cameron Zwarich
This is pretty confusing to me because it’s associative in the opposite direction that function application is associative in functional languages with automatic currying. Cameron On Jun 28, 2014, at 3:48 PM, Benjamin Herr b...@0x539.de wrote: So, I've been vaguely concerned that types in a

Re: [rust-dev] Syntax sugar: Vec Rc RefCell Box Foo - VecRcRefCellBoxFoo

2014-06-29 Thread Benjamin Herr
I realize that, but simplifying ArcExclusiveVecBoxBufferT into Arc (Exclusive (Vec (Box (Buffer T wouldn't really buy us that much. On Sun, 2014-06-29 at 09:50 -0700, Cameron Zwarich wrote: This is pretty confusing to me because it’s associative in the opposite direction that

Re: [rust-dev] Syntax sugar: Vec Rc RefCell Box Foo - VecRcRefCellBoxFoo

2014-06-29 Thread François-Xavier Bourlet
Isn't: type my_convonluted_type = ArcExclusiveVecBoxBufferT; The most common way to avoid retyping long definition? one could also pretty indent the type definition for readability, since it will be defined once. On Sun, Jun 29, 2014 at 9:56 AM, Benjamin Herr b...@0x539.de wrote: I realize

[rust-dev] Support for Literate Rust

2014-06-29 Thread Nathan Typanski
Literate Rust (.lrs) I'm wondering if anyone else here has had the thought of supporting literate programming in Rust. For those who don't know what this is about, a language with good support for the concept is Haskell [1], which normally uses bird-style () for code blocks.

Re: [rust-dev] Support for Literate Rust

2014-06-29 Thread Evan G
I'm not sure if this is exactly what you're looking for, but rust already has support for running code examples in documentation. If I remember correctly, all of the code examples in the guide are currently run and tested as part of make test, so this is at least part way towards what you want.

Re: [rust-dev] Support for Literate Rust

2014-06-29 Thread Brian Anderson
It does seem like rustdoc could be extended to do something approximating literate programming without much hassle. I'd like to see this project built out-of-tree using the rustdoc and rustc API's. On 06/29/2014 12:38 PM, Evan G wrote: I'm not sure if this is exactly what you're looking for,

Re: [rust-dev] Integer overflow, round -2147483648

2014-06-29 Thread Gábor Lehel
Thanks to everyone for the excellent feedback. I've submitted an RFC incorporating many of the ideas from the discussion: https://github.com/rust-lang/rfcs/pull/146 On Fri, Jun 27, 2014 at 5:58 PM, Patrick Walton pcwal...@mozilla.com wrote: On 6/27/14 1:31 AM, Igor Bukanov wrote: This bug

Re: [rust-dev] Syntax sugar: Vec Rc RefCell Box Foo - VecRcRefCellBoxFoo

2014-06-29 Thread Benjamin Striegel
If the vast majority of types take only a single type parameter, then it could potentially be worth considering using a unary sigil. (I think D does something like this.) Choosing the tilde as the arbitrary symbol here, your example would look like Arc~Exclusive~Vec~Box~Buffer~T. If you have