Robert »phaylon« Sedlacek
Robert »phaylon« Sedlacek
One thing I'd like to add, it should potentially keep a discouraging message at least for certain contexts. For example, I would assume that it's a bad idea to rely...
I think something like this is how I would write it today: ```rust let result = context .client .create_some_request(tonic::Request::new(some_request)) .await? .into_inner() .result; match result { Some(Success(s)) => Ok(s), Some(Error(err)) =>...
This might also be nice for allowing inline type ascription: ```rust let res = foo(typed!(String: bar.into())); // could also be let res = foo(bar.into().typed!(String)); ```
My +1 would go to `$self`. It works inside closures (including Try::Tiny, Log::Contextual, and all other internal or external uses of the `(&)` prototype. It is always consistent (`map {...
But is it worth all of the above? In all my uses of syntax extensions on CPAN providing an implicit invocant lexical, I never longed for it to be a...
I think it would be favorable to have it work in all closures. Meaning you can go from `map { self->foo } ...` to `my_parallel_map { self->foo } ...` to...
There's also the case of closing over `self` in something you pass on: ``` self->_find_items(sub { self->_item_is_blue($_) }) ``` Since that might or might not be executed by a method...
The thing is, if you can't close over it at all, it severely limits it's use. If you can only close over it sometimes, it makes the matter more complicated.
My issue is, if I start out with using the keyword variant and suddenly have to close over it I have two choices: use both variants in a single method,...
Something similar to this can also be found in the accumulator callback for GObject signals: https://developer.gnome.org/gobject/stable/signal.html#signal-registration and seems quite useful.