Anyone know why we treat lists and strings differently on 64bit systems? They both should be exactly the same given they have the exact same in memory structure. I assume it is just for some legacy reason with how we generated the structures or something?
It seems that lists are are internally passed around as structs while strings are passed around as pointers. I think they probably both should be pointers. At a minimum, they probably should be the same.
I don't know the reason, but I agree we should pass them the same way!
might have been an accident bc they were implemented at different times?
Could it be we generally have more registers to fit things into on 64bit?
I mean that would be a reason for maybe passing as a struct instead of a pointer, but not a reason for list and str differing.
That said, I think at the size of 3 usize, by pointer is most common.
I think we got started with strings and then got distracted and never did lists. We should
Ah. That makes a lot of sense
Last updated: Jul 06 2025 at 12:14 UTC