Rust-based provocation :)
Adam D. Ruppe
destructionator at gmail.com
Mon May 27 08:45:03 PDT 2013
On Monday, 27 May 2013 at 14:36:59 UTC, Dicebot wrote:
> But issue is not creating minimal run-time, it is creating
> minimal one that still has most part of language usable.
eh the question is what is "most"? Even my little 200 line thing
has: functions, templates, scope closures, structs including
operator overloading, static arrays, slices, pointers,
__traits+ctfe, scope guards, switches, and more.
I just now added basic classes and that wasn't too hard
(copy/pasted some code from the real druntime for the typeinfo
and so on).
But it doesn't do AAs, throwing exceptions, dynamic arrays and
other nice features. Looking at druntime's src, exceptions look
hard, and while dynamic arrays, heap closures, and others can
easily 'work', they will leak memory, so I don't think they will
ever be really good without gc. Exceptions are doable though from
what I can tell.
Anyway I think this is enough to do some real programs and feel
kinda nice. Surely no worse than C at least.
> Automatic memory allocation is widely known but emitting
> TypeInfo's for almost everything is as much painful.
Yeah, the typeinfos are a pain in the butt, even trying to
copy/paste it from druntime isn't that easy. I'm sure this would
strike again if we actually tried writing a real program.
More information about the Digitalmars-d
mailing list