Ruby adds experimental support for Rightward assignments
03-Sep-2020 1996
Historically, all of the early programming languages were designed by Mathematicians. It’s a common practice in mathematics to say let x = 4y z, which is read as let x be equal to 4y z.So the same pattern is followed in programming languages as well.For assigning a value to a variable, we typically do age = 42 in ruby. Here we are assigning the Rvalue 42 to an Lvalue age.While the above pattern has become standardized, it feels somewhat unnatural as we read most of the spoken languages from left to right.We were not able to do something like 42 => age.
Ruby adds experimental support for Rightward assignments #ruby #rubydeveloper #rubyonrails #experimental #support #Rightward #assignments https://rubyonrails.ba/link/ruby-adds-experimental-support-for-rightward-assignments