free function on arrays & language operations

spir denis.spir at gmail.com
Tue Dec 7 10:10:31 PST 2010


Hello again,

I started to be found of defining types which basically are arrays with free functions, instead of creating a struct or class with methods. Not only we still have pseudo-method syntax (for arrays only), but this allows customizing the type when needed.
But: is there a way to define functions corresponding to language operations (opEquals, opIndex, toString...) without creating a true type?

Thank you,
Denis
-- -- -- -- -- -- --
vit esse estrany ☣

spir.wikidot.com



More information about the Digitalmars-d-learn mailing list