> Reference Counting with cycle detection at exit, 95% of reference count ops removed at compile time thanks to lifetime analysis.
This is really clever. Why don't more languages do this? Also, is this the same analysis that does type checking? And does this technique make it unbearably slow?
Aardappel · 8h ago
No, this analysis is fairly linear.. the whole compiler is pretty fast.
90s_dev · 1d ago
> Choose between running directly using the convenient JIT, or compilation to C++ for extra speed.
C++ is an odd compilation target. Usually it's just C. I'd be curious to see what kind of C++ it emits, and whether the techniques it uses would be better exported as C++ libraries than a new language on top of C++.
Aardappel · 8h ago
All the VM runtime functions are written in C++, as are all of the built-in functionality and the engine it uses. To use C, either all of that needs to be rewritten in C, or there needs to be a clear layer between the two, but the API surface is fairly big.
It actually uses C for the JIT (libtcc), but the fact it has to go thru a layer is a source of slowness and complication.
zem · 1d ago
compiling to c++ has the possibility of interop with c++ libraries, without being tied to c++ as a language. that's really hard to do any other way.
90s_dev · 1d ago
FYI this is not a PDF even though it looks like it. Took me a minute.
Also, why haven't we standardized a syntax yet? Seems like at this point we shouldn't be debating braces vs do/end vs indentation, and we should just settle.
> Lobster is a programming language that tries to combine the advantages of static typing and compile-time memory management with a very lightweight, friendly and terse syntax, by doing most of the heavy lifting for you.
That's... a non-sequitor? Syntax is interesting to discuss and think about it, but when I see "static typing and compile-time memory management", I want to jump right into knowing more about its implementatoin and usage. Does it use ref-counting? Is it embeddable like Lua? Does it have a VM or compile to machine code? etc.
This is really clever. Why don't more languages do this? Also, is this the same analysis that does type checking? And does this technique make it unbearably slow?
C++ is an odd compilation target. Usually it's just C. I'd be curious to see what kind of C++ it emits, and whether the techniques it uses would be better exported as C++ libraries than a new language on top of C++.
It actually uses C for the JIT (libtcc), but the fact it has to go thru a layer is a source of slowness and complication.
Also, why haven't we standardized a syntax yet? Seems like at this point we shouldn't be debating braces vs do/end vs indentation, and we should just settle.
> Lobster is a programming language that tries to combine the advantages of static typing and compile-time memory management with a very lightweight, friendly and terse syntax, by doing most of the heavy lifting for you.
That's... a non-sequitor? Syntax is interesting to discuss and think about it, but when I see "static typing and compile-time memory management", I want to jump right into knowing more about its implementatoin and usage. Does it use ref-counting? Is it embeddable like Lua? Does it have a VM or compile to machine code? etc.