C and C++ are too difficult, Rust is also hard. I think my best bet is Zig at this point.
C and C++ are too difficult, Rust is also hard. I think my best bet is Zig at this point.
These assumptions just aren't made with rust.
I know you said C seems too hard - I felt the same way some 30 years ago. Then I learned Pascal, and found learning Ada to be a bit of a breeze after that. After that, coming back to C was a different experience - very natural. You don't have to force anything, and you can learn whatever you want whenever you want (or not at all).
Sometimes your capabilities can quickly level up in unpredictable and exciting ways - which I find to be one of the most fun parts of programming. And it tends to unfold like a horizon - you learn low-level stuff, then you get interested in high-reliability software, or real-time systems, or highly parallel / functional systems, etc. This is all great, and no one brain is big enough to hold it all - so have fun!
At least that's how things clicked for me when I came from Java and I already had to debug lots of concurrent code before.
Similarly, if one has fought with a garbage collector and thought about efficient memory representations, where things get allocated and deallocated that transfers to some extent.
If you have been living blissfully in effectively-single-thread-land, then yeah, there'll be a bunch of new concepts to digest.
I couldn't really grass programming until I found JavaScript. Even now my criteria for learning a language is one of two things .
One, do I want to build something and this language would be the best tool .
Or, two, is this language going to make me a ton of money.
I really want to find a good use case for Rust that isn't superseded by what I can do in the languages I already know. I might take some time to make a game in Rust one day...
I don't think any language per se is ever going to make you a ton of money. Even COBOL is not enough to make a ton of money. What might make you a ton of money at some point is being highly skilled at developing in some broad area where that particular language happens to be used.
> I couldn't really grass programming until I found JavaScript.
This is a bit surprising to me, because JavaScript is not at all an easy language to work with. You might want to look into TypeScript as a way to make quicker progress in that same domain, with Rust as more of a side-project to help you grok lower-level programming in general.
> I might take some time to make a game in Rust one day...
Game development in Rust tends to be especially challenging, since the main competition is C++ - another low-level language. Take a look at this example of a very simple Breakout game in Bevy, one of the most well-known game engines (though still very much at a highly experimental stage!) https://github.com/bevyengine/bevy/blob/latest/examples/game... - this might help you realize the level of effort that's typically involved.
JavaScript just clicked. A lot of more complicated things you need to understand for c and c++ are just handled for you.
To be fair I was technically using Unity Script, which has everything in a nice game engine sandbox. Want to move a cube, takes 1 line of code.
I am working with Typescript on my latest project. It definitely helps when dealing with more complex projects. My current project is basically a website built in React.
I still like Unity, but I don't trust the company so I'm looking for a new engine.
Then the obvious choice is arguably Godot, which supports a similar "script-based" model.
Maybe I'll see if they fix C# web exports.
Which always gets forgotten in fearless concurrency discourse.
I also haven’t had as much fun learning another language in a long time. Keep with it! It’s worth it.
For example, although one can use pointers in D with abandon, it's better to use slices, where array bounds overflows cannot happen. Array bounds overflows are the #1 cause of security bugs in shipped C/C++ software.
> C and C++ are too difficult
I want to like D, it definitely came up in my research but I just don't see the ecosystem as vibrant enough to lead to where I want it to .
Either building cool things, or better employment opportunities.
It is encouraging to see a language so loved folks are proselytizing for it.
My vote is for Haxe! But that's also a very high level language.
I haven't experienced a memory corruption problem with it in maybe a decade, and I write D code every day. That's a big change from my days writing C and C++.
The language has a lot of corners though -- not so much messy edge cases like C++ but just emergent complexity from its sophisticated grammar and type system.
As with all such languages: you do not have to make use of all language features everywhere, and in fact you should not.