D Beginner Trying Manual Memory Management

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jan 13 00:37:33 PST 2015


On Mon, 12 Jan 2015 22:07:13 +0000
aldanor via Digitalmars-d-learn <digitalmars-d-learn at puremagic.com>
wrote:

> I see, thanks! :) I've started liking structs more and more 
> recently as well and been pondering on how to convert a 
> class-based code that looks like this (only the base class has 
> any data):
p.s. can't you convert most of that to free functions? thanks to UFCS
you'll be able to use them with `obj.func` notation. and by either
defining `package` protection for class fields, or simply writing that
functions in the same module they will have access to internal object
stuff.

and if you can return `obj` from each function, you can go with
templates and chaining. ;-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20150113/a11c4e14/attachment.sig>


More information about the Digitalmars-d-learn mailing list