My point with “people prefer Julia for hard-real-time” is that it’s possible. Mindshare may be missing. Games, which as (soft) real-time, are also possible, I didn’t say easier than with C#, I meant basically no huge road-block.
You can precompile Julia code already, and not use runtime code generation. Getting rid of the LLVM as a dependency is only about distributing smaller binaries. Julia as is isn’t that large compared to huge games…
Interesting, while possibly not always. Julia stack allocates by default, since Julia 1.5, for isbits types. It’s likely stackalloc
in C# is implemented by alloca (non-portable in C), _alloca, or _malloca, then possibly not stack-allocating. Dos and Don'ts of stackalloc
For _malloca | Microsoft Learn
If size is greater than _ALLOCA_S_THRESHOLD , then _malloca attempts to allocate on the heap, and returns a null pointer if the space can’t be allocated.
For C: C Language Tutorial => alloca: allocate memory on stack
Do not use
alloca()
in new code
In Linux: “The alloca () function is machine- and compiler-dependent.”, additionally in FreeBSD: “its use is discouraged.” Rust has at least two libraries: stackalloc — Rust library // Lib.rs
Games make their own “GUI”. I’m not aware of missing support do get graphics to the screen (at least for something comparable to Minecraft), and even if something is missing you can reuse C++ code to do that. I agree access to major game engines would be a plus, but you can do 3D only with Julia.
It provides access to windowing, graphics, audio and network.
I’m not saying writing shaders is better in Julia (than e.g. C#). I doubt it, but it’s possible (or use C++ with):