On Saturday, 26 May 2012 at 17:59:46 UTC, F i L wrote:
Chad J wrote:
I think my only complaints were the bus-factor and the
apparent lack of array slices (the kind that doesn't cause
copying). Still, very promising.
It actually does have slices as a construct in the system lib
(included by default).
http://force7.de/nimrod/system.html#139
http://force7.de/nimrod/system.html#606
but I'm not sure how they stack up against D's in practice.
Nimrod's builtin slices copy. It's possible to implement more
D-like slices in Nimrod, but a bit tricky. However, if you don't
copy slicing a large string (or array) keeps the whole string in
memory so it's questionable whether it's a good idea.
D implements slices as (ptr, length) pairs which causes issues
for a GC as that invites lots of interior pointers and GCs tend
to have problems with those, causing at least some overhead in
the GC/memory system.