Ruby adds experimental support for Rightward assignments

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 https://rubyonrails.ba/single/ruby-adds-experimental-support-for-rightward-assignments

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles