Re:Rails is not written in Ruby
by int_19h on Friday February 04, 2022 @06:27PM
(#30214980)
The most straightforward solution to this is the one that D employs, whereby A(B) is syntactic sugar for A.B() if the former is not otherwise valid.
[ Parent
| on HN ]
Re:Rails is not written in Ruby
by dragonwriter on Friday February 04, 2022 @06:36PM
(#30215087)
> The most straightforward solution to this is the one that D employs, whereby A(B) is syntactic sugar for A.B() if the former is not otherwise valid.
Isn't the D solution actually that:
A.B(...)
is syntactic sugar for: B(A,...)
if A.B() is not specifically defined.(Yours both flips the elements and reverse the direction of sugaring, as I understand it.)