jeremyevans0 (Jeremy Evans) wrote in #note-6: > Not sure why the local variable declaration would matter, as long as you don't pick one already in use. Because you have to write the name of the variable twice. And coming up with names c...lpogic (Łukasz Pomietło)
The advantage of the proposed syntax is that it does not require an explicit declaration of an auxiliary variable, like here: ```rb return result if result = my_calculation(input_a, input_b) ``` and here: ```rb x = my_calculation(i...lpogic (Łukasz Pomietło)
Such a note in the documentation would certainly be advisable. Could a similar one be added to the `max`, `min` and `minmax` methods?lpogic (Łukasz Pomietło)
nobu (Nobuyoshi Nakada) wrote in #note-4: > I'm not sure what the last example means, maybe incomparable -> true? Yes, this is a case where objects are incomparable. I'm not sure if `true` is the most appropriate value, but I don't h...lpogic (Łukasz Pomietło)
P3t3rU5 (Pedro Miranda) wrote in #note-3: > comparison operator already exists it's `<=>` > ... `<=>` is good enough for comparing a single property, e.g. `a.y <=> b.y`. Things get complicated when we want to compare several consecutiv...lpogic (Łukasz Pomietło)
I think that not having to create intermediate arrays and referencing the x coordinate when y is different would be an advantage.lpogic (Łukasz Pomietło)
I propose introducing a comparison operator *<>* which would give the following results: ```ruby 1 <> 2 # => -1 2 <> 1 # => 1 1 <> 1 # => false 1 <> "a" # => true ``` With the help of the new operator, complex ordering expressio...lpogic (Łukasz Pomietło)
+1. Regarding indentation, I once read that a multi-line "if" condition looks better with "then": ``` if request.secret_key_base.present? && request.encrypted_signed_cookie_salt.present? && request.encrypted_cookie_salt.present...lpogic (Łukasz Pomietło)
AlexandreMagro (Alexandre Magro) wrote in #note-47: > The pipe operator is well-known, but this type of operation with assignment is something I haven’t seen before, and I’m not sure of its precedence. The examples also don’t illustrate...lpogic (Łukasz Pomietło)