From: boris@... Date: 2014-09-19T05:07:13+00:00 Subject: [ruby-core:65121] [ruby-trunk - Feature #8365] Make variables objects Issue #8365 has been updated by Boris Stitnicky. I have noticed Binding#local_variable_get and Binding#local_variable_set. I wanted to express appreciation. ---------------------------------------- Feature #8365: Make variables objects https://bugs.ruby-lang.org/issues/8365#change-48973 * Author: Boris Stitnicky * Status: Feedback * Priority: Normal * Assignee: Yukihiro Matsumoto * Category: * Target version: Next Major ---------------------------------------- While refactoring a wiki article about Ruby, I found this anonymous proposal: "How about making variables objects. And assignment is the default message you send to the variable object (not the underlying reference). anintvar 5, now the variable "anintvar" is a reference to the constant integer 5. And since variables are objects, you can do some neat things like subclass variables. It would be a mixed world of static variable typing and dynamic. Use the appropriate one for a given scenario. You could also do linear casting. exm. integer new anintvar 5 char new acharvar anintvar Variable types and the reference object they point to can be 2 different types. But the variable decides how to do the casting not the object referenced. "anintvar" and "acharvar" reference the same object." I am pasting this anonymous proposal here in original full length, before I rewrite it to a more concise form in that wiki page. -- https://bugs.ruby-lang.org/