how to feel beginner again when learning a new language: Closure in #rustlang: http://yanns.github.io/blog/2016/05/23/rust-closures-as-input-parameters/ …. If you have any good doc source...
-
-
Replying to @simon_yann
it's about trait objects vs type parameters, which can be tough when you're learning
1 reply 0 retweets 2 likes -
Replying to @rustlang
Thx to the keywords found in your tweet, I think I now understand and pushed an update: http://yanns.github.io/blog/2016/05/23/rust-closures-as-input-parameters/#update-2016-05-25 …
1 reply 0 retweets 5 likes -
Replying to @simon_yann @rustlang
one tweak: closure object is allocated on stack, not heap
1 reply 0 retweets 1 like -
Replying to @nikomatsakis @rustlang
thx for the reply. Also dynamic dispatch is allocated on stack?
2 replies 0 retweets 1 like -
Replying to @simon_yann @rustlang
right, exactly. I meant "in the code you wrote, it is using the stack to store the (dynamically dispatched) object"
1 reply 0 retweets 1 like
specifically when you have `&|| foo`, that `&` operator allocates some space on the stack to store the closure in
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.