المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Is there a use for... [modified]



C# Programming
08-27-2011, 05:40 AM
In my meanderings through weird code ideas, I wrote down some simple classes in C# based on the idea of "What if variables were typed based on what they returned when called, using that as what they are."

So, for example, an equation that returns a double "is" a double (or derived from DTBase(double)); a DTFunc(string) that concatenates a string based on relevant factors "is" a string (or derived from DTBase(string)) and, of course, a DTVar(int) contains and "is" an integer. (Parenthesis substituted for angle brackets)

Being as this website is about code and being that I wrote this in C#, I decided to see what other programming netizens might think of this idea, as well as the rather present idea that someone may have thought of this first.

Thanks.

modified on Friday, August 26, 2011 9:16 PM