Wow quick replies, thanks :)

Is `create()` not just a convenience wrapper around `alloc()`? It looks like it 
just takes `sizeof(T)` for you to avoid you doing that yourself and then casts 
it nicely for you?
    
    
    cast[ptr T](alloc0(sizeof(T) * size))
    
    
    Run

I was on that train of thought myself when I noticed `echo DangerousCat.sizeof` 
is 8 bytes/64 bits so the size of a pointer and not the size of the 
"underlying" struct itself.

Is there an easy way to get the `sizeof` the underlying type? Basically the 
same way you would do `malloc()` in C would be `malloc(sizeof(DangerousCat))` 
and make `DangerousCat` not a `ptr object`... so I seem to have come 
full-circle on the "don't use `ptr object`" for type definitions argument!

Reply via email to