for the sake of simplicity and my own personal sanity, the first version of comune probably won't have storable references. rather, you'll be able to implement non-trivial memory structures using raw pointers behind `unsafe` blocks - or, y'know, use libcomune-provided types when they arrive
(and honestly, i've found the approach of "use references for trivial stuff, and standard library types for complicated cases" more than sufficient for implementing comune in Rust, too)
i've been meaning to get around to this for ages, but the semantics of Drop and Move heavily rely on having a robust liveness analysis up and running. it's still not at 100%, but it handles non-trivial cases well and i'm a lot more confident in its logical soundness. feels good man
i gotta say though, i am really pleased with how consistent and clean the syntax looks after the switch to east-qualifiers. especially the `ret(args)` function ptr syntax is like, the platonic ideal of clean C-style syntax to me. love it
at this point, the work for function pointers in the middle- and back-end is done, but to actually make them usable i have to finally implement support for global variables lol
only way comune's type syntax is remaining sensible whatsoever is with east qualifiers. do NOT dm
actually what the hell am i thinking. i can just regex search for includes of comune files and replace them with their equivalent C++ headers directly, that's the point of an include directive lmao
could i re-implement (a subset of) the preprocessor to scan source files for includes of comune files, and generate the appropriate headers? is that a reasonable thing to do? probably not but it doesn't SOUND particularly gruelling
looking into it a bit, this feels like it should work? at least for basic interop. template support is another matter entirely, but i should be able to expose types and functions from C++ using a wrapper around libclang, and... generate C++ headers to expose my language's interface to C++? maybe? would have to look into how to deal with includes though
currently looking into actual C++ integration for comune. anyone know if libclang is a viable candidate for implementing C++ interop in an LLVM-based compiler? #PLDev
unintentional but very welcome side effect of getting the live-variable check working properly again: it points out when the IR i'm generating makes Absolutely No Fuckin Sense Whatsoever Dog
musician, (game)dev, artist, rust nerd, final boss of linux transfems. autism be damned my boy can girl