In Godot, when we compile, we can optimize a build for size. This allows us to disable certain features. For example, a 2d game developer can disable all the 3d functionality. This allows for quicker compile times and a lower filesize. With Crystal, I’m not worried about filesize since it’s already pretty low and not an issue for me. However, I saw a compile time issue on reddit and it made me think of an idea! :D
I was browsing the compiler GitBook, and noticed there is nothing that lets us disable certain modules. There is quite a bit of modules/classes that my gameserver will never use ( ECR, HTML, Levenshtein, OAuth, OAuth2, Readline, URI, XML, Zip, Readline, YAML, MIME, BigRational, Atomic, Adler32, Benchmark, GC, StringScanner, WeakRef, UDPSocket, Termios, OptionParser, ZLib, Complex).
Some of these will not be loaded because I will not require
them. Which is cool. However, if the developer could disable certain features that negatively affect compile speeds… that would be awesome!
Of course each developer has different needs dependent on their project, I’m not trying to say these are unnecessary (this is relative to my personal project).
Now, if some of these are required for the language to function (then I basically just shot myself in the foot with this topic). But I think it’s a worthy discussion to have regardless.
What do you all think?