From: borisstitnicky@... Date: 2016-08-19T19:21:26+00:00 Subject: [ruby-core:76985] [Ruby trunk Feature#8365] Make variables objects Issue #8365 has been updated by Boris Stitnicky. My account got deleted in the meantime so my posts show as 'Anonymous'. I'm back and curious how this feature request resolves in the end. ---------------------------------------- Feature #8365: Make variables objects https://bugs.ruby-lang.org/issues/8365#change-60209 * Author: Anonymous * Status: Feedback * Priority: Normal * Assignee: Yukihiro Matsumoto ---------------------------------------- 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/ Unsubscribe: