News for hackers. Stuff that matters.
Re:Rhine – A Lisp on LLVM by artagnon on Saturday September 06, 2014 @11:11AM (#8278509)
Because one type may use more than one field. Vectors and strings use the nr field additionally, and functions use the vector/fenv field additionally. Instead of creating a hierarchy, I figured a flat structure would be easier to understand.
Re:Rhine – A Lisp on LLVM by thinkpad20 on Saturday September 06, 2014 @01:48PM (#8278934)
I was going to ask about this as well. It seems like there's a lot of wasted space in how things are represented. The first field already tells you what type of object you're dealing with. Since you're using 64-bit integers, you could represent pointers, bools, ints and floats all in the same memory space. I guess there might be some types that use more than one field, but certainly a bool is not going to.

There's also the issue of alignment with the usage of 1-bit and 1-byte types...