On Tuesday, 21 February 2017 at 16:18:44 UTC, Stefan Koch wrote:
On Tuesday, 21 February 2017 at 12:45:47 UTC, Mithun Hunsur
Introducing Moonshot (https://github.com/Philpax/moonshot)!
Looking over the code for lua it seems that you use std.format
a lot a ctfe.
I would advise against that as it needlessly increases compile
The built-in concat operator is supposed to be faster in many
I am interested in how you handle complex types i.e. structs
with pointers of the same struct type and the like.
I think moonshot is a worthwhile effort.
Congrats for getting something like this to work.
I figured you'd have some thoughts on the matter! You're right,
I've used `std.format` a fair bit out of convenience; I'll see
what I can do about going back to regular old concat.
I'm not sure about how I'm going to support pointers/references
yet, but I suspect the case you've suggested should be fairly
simple. As Lua has reference semantics by default, I'm
representing the struct as a table that gets copied on
assignment; this means the representation of Struct* should be
the same thing, but without the auto-copy.
(Ooh, there's a fun subtopic for a potential talk: representing
value types with reference types.)
Thanks for the feedback!