News for hackers. Stuff that matters.
Re:Porting a NES Emulator from Go to Nim by andolanra on Friday May 01, 2015 @04:39PM (#9474367)
You can have manual control over memory if you want, though. This worked the last time I looked at the language, at least:

    foo = cast[ptr Foo](alloc(sizeof(Foo)))
    # do stuff with foo
    dealloc(foo)
EDIT: Here's the documentation on the site itself. Most things are 'traced' by the GC, but by using alloc and dealloc you can work with 'untraced' (i.e. manually allocated) memory: http://nim-lang.org/0.11.0/manual.html#types-reference-and-p...
Re:Porting a NES Emulator from Go to Nim by pcwalton on Friday May 01, 2015 @06:39PM (#9474966)
Go has unsafe.Pointer too.