General

Profile

myxoh (Nicolas Klein)

  • Login: myxoh
  • Registered on: 12/25/2019
  • Last sign in: 08/20/2021

Issues

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

Activity

08/20/2021

06:52 PM Ruby Feature #18124: Hash shorthands (matching constructors functionality in JS)
osyo (manga osyo) wrote in #note-7:
> mame (Yusuke Endoh) wrote in #note-3:
> ...
Yes, fair find! If google translate is translating correctly it seems the exact same specification.
Sorry, should have done a better job searching for i...
myxoh (Nicolas Klein)
06:42 PM Ruby Feature #18124: Hash shorthands (matching constructors functionality in JS)
mame (Yusuke Endoh) wrote in #note-3:
> For "Destructuring", you can use one-line pattern matching since Ruby 3.0:
> ...
Thank you, haven't had enough of a chance to play with Ruby 3. Clearly I missed things.
I've updated to remove th...
myxoh (Nicolas Klein)
06:04 PM Ruby Feature #18124 (Closed): Hash shorthands (matching constructors functionality in JS)
# **Suggestion:**
To implement one shorthand operators that allows you to construct hash into local variables and construct local variables into a hash.
# **Context:**
Javascript and other languages have a similar feature. It's help...
myxoh (Nicolas Klein)

12/26/2019

10:15 AM Ruby Feature #16451: Special ternary operator for methods ending in `?`
nobu (Nobuyoshi Nakada) wrote:
> A method ends with `?` also can take argument(s), so the proposed syntax introduces an ambiguity which doesn't seem solvable.
I won't claim to be an expert in how the interpreter works, so I'll take y...
myxoh (Nicolas Klein)

12/25/2019

10:36 PM Ruby Feature #16451: Special ternary operator for methods ending in `?`
shevegen (Robert A. Heiler) wrote:
> I am slightly against this proposal.
> ...
While I'm not going to argue that `if else end` statements read nicer than the ternary statement. Reality is that the ternary terms to be the preferred opt...
myxoh (Nicolas Klein)
10:26 PM Ruby Feature #16451: Special ternary operator for methods ending in `?`
sawa (Tsuyoshi Sawada) wrote:
> The current ternary operator does not work that way. It works like this:
> ...
You are right, I've corrected the example
myxoh (Nicolas Klein)
03:46 PM Ruby Feature #16451 (Open): Special ternary operator for methods ending in `?`
When a method ends in `?`, we should be able to skip the `?` in the ternary operator. For example, we should be able to do:
```ruby
question_method? true_statement : false_statement
```
This shouldn't interfere with implementatio...
myxoh (Nicolas Klein)

Also available in: Atom