Re: [rust-dev] Using a closure as a return value

2014-02-23 Thread Philippe Delrieu
Thank you for your help and to spend so much time on my problem. I've already think of a similar solution but what I would like to avoid is to have a RenderTrait that propose all the rendering method because they depend on the rendering engine. You don't render the same way if you use a vector

Re: [rust-dev] Using a closure as a return value

2014-02-23 Thread Maciej Piechotka
On Sat, 2014-02-22 at 22:48 +0100, Philippe Delrieu wrote: > Thank for you reply. But I don't see any solution to my problem.. I'll > explain it a little more. > > I want to develop a sort of GUI. The GUI has its own logic and use a > rendering engine to do the work. I want my GUI separate of the

Re: [rust-dev] Using a closure as a return value

2014-02-22 Thread Philippe Delrieu
Thank for you reply. But I don't see any solution to my problem.. I'll explain it a little more. I want to develop a sort of GUI. The GUI has its own logic and use a rendering engine to do the work. I want my GUI separate of the rendering engine. In the first solution I use a trait that hide t

Re: [rust-dev] Using a closure as a return value

2014-02-19 Thread Jack Moffitt
> I'am learning the functional programming paradigm with rust and to help me I > decide to translate the pattern of the book "Functional Programming Patterns > in Scala and Clojure" in Rust. In this work I have a problem to return a > closure (or a function) as a return value and I didn't find any

[rust-dev] Using a closure as a return value

2014-02-19 Thread Philippe Delrieu
Hello, I'am learning the functional programming paradigm with rust and to help me I decide to translate the pattern of the book "Functional Programming Patterns in Scala and Clojure" in Rust. In this work I have a problem to return a closure (or a function) as a return value and I didn't find