4 ms·
I wonder if there are enough statically compiled languages out there. Not to be arrogant, but it doesn't seem new and/or recent languages are picking up fast e
by jokoon 8y ago
I wonder if there are enough statically compiled languages out there.
Not to be arrogant, but it doesn't seem new and/or recent languages are picking up fast enough, because their syntax is just not simple enough. I see many languages, and I never really find one that is interesting to me.
I recently found volt, and I thought this language was really awesome. Then I realized that it is garbage collected.
D is fine, but it has too many high level constructs (OOP and al) which I don't find useful. Rust is okay, but to me syntax matters most, and to me rust is too far from C.
All of this shows that you cannot beat C.
I just want a language that picks up from C, has the ease of use and readability of python, doesn't include high-level constructs as first class citizen, and compiles to LLVM or machine code. I wish I had the skills to build such language. C++ is close, but its slow compilation and its backward compatibility with C are not good.
- faceplanted 8y agoSounds like you want Rust with Python's syntax
- adwn 8y ago> All of this shows that you cannot beat C. No, all of this shows that you have very peculiar preferences and demands, some of which are more emotional than technical. > I just want a language that picks up from C, has the ease of use and readability of python These two requirements are mutually exclusive.
- cryptonector 8y agoNim does that. But I myself don't want Python-style syntax. I like braces and dislike semantic indentation -- part of it is that I like showmatch, and part of my aesthetic sense.
- chris_mc 8y agoNim? nim-lang.org It's GC, but that can be turned off and you can use manual memory management or you can simply use one of a handful of GC methods that work for you (in my experience, the GC is very performant). It has easy syntax like Python. It can be compiled to C, C++, ObjC, or JS (currently). It has tons of meta-programming features like templates, macros, etc. It can be cross-compiled fairly easily to almost any platform. It has whatever high level stuff you want to use, or just don't use them. It's not 1.0 yet, but it's pretty stable overall and the current release is feature-full enough that you could do just about anything with it that you want, right now. It's also got a really easy to use FFI. It's also about as fast as C, in practice.
- TimJYoung 8y agoYou can write Object Pascal code like that - you just ignore the "object" part and write it like traditional imperative code with functions/procedures, records (structs), manual memory management, etc. https://www.freepascal.org/ https://www.freepascal.org/
- pjmlp 8y agoBefore UNIX got widespread adoption in the industry, C was just yet another systems programming language. We had quite a few alternatives, with saner defaults, but some did not come with an OS and others died alongside with their OS. So it is not that C won somehow magically, rather just like the browser comes with JavaScript, UNIX came with C. And getting rid of UNIX and POSIX will be a very hard thing to ever achieve, other than being a Google, Microsoft, Apple and pushing something else forward no matter to whom it hurts and how much it costs.
- bachmeier 8y ago> D is fine, but it has too many high level constructs (OOP and al) which I don't find useful. D has betterC mode. It's hard to get closer to C than that. https://dlang.org/spec/betterc.html https://dlang.org/spec/betterc.html I can understand if you make the argument that D isn't as portable because it doesn't support as many platforms, but you certainly don't need to use classes, which are not even supported in betterC.
- dotancohen 8y agoYou do want C++. No other language is going to be more backwards compatible with C, because no other language has that goal. If slow compilation is what is bothering you, you might want to look at your compiler options for your target architecture and of course, update your hardware. What type of software are you writing? What is your development platform, and what are you targeting? Are you using a good IDE, like Clion?
- jokoon 8y agoI have an i5 which is 2 years old, 16GB of ram and a SSD. I want to write games, and usually the libraries involved can be a little large, like bullet or Ogre3D. I remember MSVC 2012 stopping compilation because of a lack of memory. Accelerating the step of rebuilding a single file requires precompiled headers, which is atrocious to manage, or specific code decomposition in several files, which is quite demanding. I'm aware modules might be accelerating compilation (I hope I'm right), but I'm not even sure they will be part of C++20. I like C++ too, but the slow compilation times are really getting on my nerves, and I wish there was a good solution for that, even if it breaks backward compatibility.