General

Profile

AlexandreMagro (Alexandre Magro)

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 1 0 1

Activity

11/29/2024

11:53 PM Ruby Feature #20770: A *new* pipe operator proposal
austin (Austin Ziegler) wrote in #note-53:
> I don't entirely agree. The ambiguity still exists because there is (more or less) an implicit block behaviour. If `_` already exists in the current scope, *both* the use of a pipe operator an...
AlexandreMagro (Alexandre Magro)
06:19 PM Ruby Feature #20770: A *new* pipe operator proposal
austin (Austin Ziegler) wrote in #note-50:
> As I said, I don't think Ruby needs a pipe operator, but I wonder if a *different* approach might be taken. In irb, `_` is automatically assigned the result of the previous expression (well, ...
AlexandreMagro (Alexandre Magro)
05:55 PM Ruby Feature #20770: A *new* pipe operator proposal
lpogic (Łukasz Pomietło) wrote in #note-49:
> I wanted _str_, _a_simple_json_ and _a_ to be treated as variables, maybe method arguments but impossible to reduce to one line.
If these variables need to be explicit and cannot be reduc...
AlexandreMagro (Alexandre Magro)

11/12/2024

07:02 PM Ruby Feature #20770: A *new* pipe operator proposal
lpogic (Łukasz Pomietło) wrote in #note-46:
> I wonder if the pipeline operator with assignment wouldn't also be useful in everyday code:
> ...
The pipe operator is well-known, but this type of operation with assignment is something I ...
AlexandreMagro (Alexandre Magro)

11/09/2024

09:42 PM Ruby Feature #20770: A *new* pipe operator proposal
austin (Austin Ziegler) wrote in #note-40:
> Ruby already *has* pipeline-like method, `#then`. If `|>` or `.{}` acts as syntactic sugar for `#then`, I don't see an issue here. If, internally, it’s turned into the effective equivalent o...
AlexandreMagro (Alexandre Magro)
09:23 PM Ruby Feature #20770: A *new* pipe operator proposal
lpogic (Łukasz Pomietło) wrote in #note-43:
> baweaver (Brandon Weaver) wrote in #note-41:
> ...
There’s no need for the syntax to take this route; using an explicit variable (last expression result variable "_") provides a clearer and...
AlexandreMagro (Alexandre Magro)

11/08/2024

08:28 PM Ruby Feature #20770: A *new* pipe operator proposal
@lpogic In these cases, you wouldn’t use pipes:
```ruby
def foo
q_result = q(r) # because q_result is important and deserves its own variable

p(r)
q_result
end
```
The pipe operator is useful when you just need to...
AlexandreMagro (Alexandre Magro)

11/06/2024

09:12 PM Ruby Feature #20770: A *new* pipe operator proposal
mame (Yusuke Endoh) wrote in https://bugs.ruby-lang.org/issues/20781#note-9 at DevMeeting:
> AlexandreMagro (Alexandre Magro) wrote in #note-8:
> ...
Yes, `r |> q |> p` was just an abstract notation to explicitly show the order of meth...
AlexandreMagro (Alexandre Magro)

11/03/2024

09:21 PM Ruby Misc #20781: DevMeeting-2024-11-07
* [Feature #20770] (Re)Introduce pipe operator (AlexandreMagro)
* Initially proposed as syntactic sugar for `.then`, and later refined after discussion to work as a statement separator (like `;`) with a variable carrying the LHS expres...
AlexandreMagro (Alexandre Magro)

10/15/2024

10:01 AM Ruby Feature #20770: A *new* pipe operator proposal
Reflecting on the opposing points raised, I believe the pipe operator could work differently, avoiding the issue of "implicit blocks" mentioned by @zverok.
As suggested by @Eregon, translating the operator to local variables reduces t...
AlexandreMagro (Alexandre Magro)

Also available in: Atom