Rename blitable
My Amiga past makes me expect more than 'copy' when I read 'blit':
https://en.wikipedia.org/wiki/Blitter
I mean, you can't blit floating point values (or pointers, like I added to the blit interface in #1111 )
I would also like to rename it too, blit feels a bit too obscure to me. Could we perhaps use flat or unboxed? Possibly also too obscure, but the notion would be that it's the opposite of a "boxed" value, which typically denotes something on the heap, so flat would denote something that's stack allocated, which is in keeping w/ Erik's original thoughts on what blit indicates:
With "freely copyable" I mean anything that only lives on the stack and where copying or deleting is taken care of by the C value type semantics.
There's already precedence for such terminology in the ATS programming language which differentiates between allocation of "flat" values and allocation of "boxed" values.
(* Flat Tuples *)
val xyx = ('A', 1, 2.0)
(* Boxed tuples, pointer to heap allocated values *)
(* spaces are required to disambiguate *)
val xyx-box = '( 'A', 1, 2.0 )
http://ats-lang.sourceforge.net/DOCUMENT/INT2PROGINATS/HTML/x302.html
Flat is nice, I like it!
Not that I have any better name to propose but isn't it a bit weird to call something Flat if we don't have Box?
Is mcpy too confusing?
I think mcpy would work as well, I agree that flat would be nicer if box was a more prevalent concept in our code and docs.
What about trivially-copyable?
Not that I have any better name to propose but isn't it a bit weird to call something
Flatif we don't haveBox?Is
mcpytoo confusing?
We might add Box later though! I think the most important thing is that the name is good on its own.
mcpy is a little too hard to read/say for my liking – in that case I think it makes more sense to just call it memcpy to make the correlation with the C function super clear.
@jacereda That name is pretty interesting too, it's very clear.
Maybe shallow could work?
shallow-copy?
Yes, that too. If seen as a "tag", the interface should probably just be called shallow but if we're going to actually call it, shallow-copy is better (and this argument applies to all other name suggestions too).
@jacereda That name is pretty interesting too, it's very clear.
It's what C++ uses: https://en.cppreference.com/w/cpp/types/is_trivially_copyable
I'll switch to trivially-copyable with the single function trivial-copy.