Possible @property compromise

Zach the Mystic reachBUTMINUSTHISzach at gOOGLYmail.com
Thu Jan 31 11:23:54 PST 2013


On Thursday, 31 January 2013 at 19:13:03 UTC, Zach the Mystic 
wrote:

Here's the most concise quote which gives you the gist of the 
thing:

"Now classes are a different kettle of fish. I haven't thought
them out and I don't think I need to. They may work seamlessly
with my idea or be fraught with problems, I don't know."

"But there will never be a need for a new empty struct. The
operator new makes no sense. There's no data! Imagine an empty
struct as a list of functions under a namespace. That's all it
really is. Except it just so happens that this namespace has a
bunch of built-in functions which allow it to appear in normal
code as if it's a *type*. Want it to appear with parens, so it
looks like a function you're calling? Just define opCall inside
the struct. Want it to appear before an equals sign. Just define
opAssign. As an array? opIndex. A basic type such as an int?
opGet. There will never be any need to create an instance. You
only need one. At runtime, there is no evidence of a pointer at
all, just normal data being passed to normal functions."


More information about the Digitalmars-d mailing list