4 ms·
I agree. I look forward to a future high-level language that uses something like comptime for metaprogramming/interfaces/etc, is strongly typed, but lets you w
by andyferris 11mo ago
I agree.
I look forward to a future high-level language that uses something like comptime for metaprogramming/interfaces/etc, is strongly typed, but lets you write scripts as easily as python or javascript.
- pron 11mo agoThing is, having a good JIT gives you the performance of partial evaluation pretty much automatically (at the cost of less predictability), as compilation occurs at runtime, so the distinction between compile-time and runtime largely disappears. E.g., in Java, a reflective call will eventually be compiled by the JIT into a direct call; virtual dispatch will also be compiled into direct dispatch or even inlined (when appropriate) etc..
- elcritch 11mo agoTryout Nim, it has powerful comptime/metaprogramming, statically typed, automatic memory management and is as easy to program as python or javascript while still allowing low level stuff. For me it'd be hard to go back to languages that don't have all that. Only swift comes close.
- jibal 11mo agoD comes close ... it too has a full-language comptime interpreter and other metaprgramming features (though not as rich as Nim's), statically typed, optional garbage collection, and you can write #!/usr/bin/env rdmd [D code] and run it as if it were an executable. (The compilation is cached so it runs just as fast on subsequent runs.)
- baranul 11mo agoThink it comes down to preferences and situation. Languages like Jai, Vlang (optional GC), and C3 are viable and they offer compile time too.
- signa11 11mo agoperhaps mojo might be your cup of tea ?
- jibal 11mo agoD and Nim both offer that. D has a tool, rdmd, that compiles (with caching) and runs a script written in D, so you write #!/usr/bin/env rdmd D code ... and run it as if it were an executable.