Rust-based provocation :)

Adam D. Ruppe destructionator at gmail.com
Wed May 29 06:28:53 PDT 2013


On Wednesday, 29 May 2013 at 12:50:36 UTC, Dicebot wrote:
> I have been thinking about this long time ago. Clearly, slice 
> semantics will change in GC-less environment and will require 
> more restrictive operation set. No automatic slice 
> concatenation at the very least.

Right. Without implementing the append function, there's a linker 
error if you try to do it:
minimal.d:29: undefined reference to `_d_arrayappendcTX'

which really isn't half bad, the line number is there too, I'll 
take it.


Another thing I'm thinking about is immutable data. String 
literals are immutable(char)[] and ok to store, so maybe any 
immutable data would be ok. I'm thinking there might be a 
newImmutable function I can make that puts the data on a special 
heap that is never free()'d. Maybe. idk, I should probably get 
back to my actual work soon anyway.

> Isn't it what "scope" was supposed to be all about? :) 
> Qualifier that prohibits leaking data outside of the current 
> scope.

Maybe, but it doesn't actually work like that right now anyway.

> Dunno. If something like this can be done, it will need full 
> re-implementation of standard library (similar to minlibd) as 
> assumption made about feature set allowed and druntime differ a 
> lot.

Yeah, but manual memory stuff would be useful even if you have 
the gc so there should be some carryover possible.


More information about the Digitalmars-d mailing list