4 ms·
Anecdotal, but I've been learning a lot of different languages over the years, the language itself is probably less than half what makes it difficult to learn.
by baby 5y ago
Anecdotal, but I've been learning a lot of different languages over the years, the language itself is probably less than half what makes it difficult to learn. The real difficulty comes when there's no good resource to learn the language, a poorly documented ecosystem, and a lack of good libraries (and worse, a bad standard library).
For example, languages like Rust are complex and hard to learn, yet many people get into Rust because it's easy to setup (rustup), easy to run or test (cargo, vscode), easy to compose (crates, stdlib), and easy to learn (so many online resources).
On the other hand I've been learning OCaml and suffering. I would advise anyone who wants to have real world impact in a low-level language to give a shot to OCaml, because there are just soooo many ways to influence the language. If you write a library it will be used, there's so many opportunities for creating learning resources or improving the tooling, it's uncharted territory for the most part and it's probably the functional language that has the most chance of having a real-world story.
- irrational 5y ago> yet many people get into Rust because it's easy to setup (rustup), easy to run or test (cargo, vscode), easy to compose (crates, stdlib), and easy to learn (so many online resources). All those things apply to Python too (not that I've learned Python ;-) There must be more than just these reasons why people learn Rust instead of Python.
- Gigachad 5y agoMore people would be getting in to Python every day than Rust. Python is what the universities teach now so you have thousands trying python for the first time probably daily.
- baby 5y agoAre there more people learning Rust than Python? I still felt like Python was sort of an ubiquitous language, a shared scripting language at the very least. I'd say Python lacks a good out-of-the-box experience compared to Rust. You can't really use Python like Rust without figuring out how to install a project's dependencies, how to manage different versions of Python (which is even more of a nightmare if Python comes pre-installed with your OS), and Python's documentation kind-of-sucks in comparison to languages like Golang and Rust I find.
- dragonwriter 5y ago> You can't really use Python like Rust without figuring out how to install a project's dependencies, Because of how batteries-included Python is, you absolutely can, because you can use it quite a bit without any dependencies outside of stdlib. > Python's documentation kind-of-sucks in comparison to languages like Golang and Rust I find. I find Python's documentation to be far and away the best of any language I have encountered, and that definitely includes Go and Rust.
- baby 5y ago> Because of how batteries-included Python is, you absolutely can, because you can use it quite a bit without any dependencies outside of stdlib. I'm not talking about stdlib. If we're talking about stdlib then Golang is the gold standard :) I'm talking about using other projects. If they use a requirements.txt and pip maybe you'll have some luck, that is if you're using the same version of python/pip. > I find Python's documentation to be far and away the best of any language I have encountered, and that definitely includes Go and Rust. I'd say everyone should make their own opinion on the subject: * https://docs.python.org/3/library/string.html https://docs.python.org/3/library/string.html * https://pkg.go.dev/strings https://pkg.go.dev/strings * https://doc.rust-lang.org/stable/std/string/struct.String.html https://doc.rust-lang.org/stable/std/string/struct.String.ht... For having written a lot of these three languages, I find python's doc an ordeal to go through. But if you're comparing Python to C, C++, and other languages like that then sure it's great :D I mean look at Golang's. List of all the methods on the left, examples for each method.
- tialaramex 5y agoI definitely prefer Rust's documentation to Python's, but while string is a useful example because there's a lot to talk about, it's also a problem because e.g. that Rust documentation is for a type named String, while the Python and Go documentation is about libraries of string processing functions. So the fact Rust's String is specifically UTF-8 text is highlighted, because the documentation is about the type, presumably (modern) Python and Go also have UTF-8 strings, but that's not the context of the doc links so that's not what they're talking about. On the other hand, some features you might expect from a string type are (at first glance) missing from Rust's String, because they're implemented on str and so you get them for free because String is Deref<Target = str> This is also a problem looking at say, Java documentation, if you don't know that all the classes (but alas not the primitives) are sub-classes of Object then you've no reason to assume Object's methods work on them. Documentation has to be pitched correctly and if you're the wrong audience you will struggle to make use of it. Presumably expert C++ programmers have no problem with this sort of mess: https://en.cppreference.com/w/cpp/string/basic_string/find https://en.cppreference.com/w/cpp/string/basic_string/find
- _greim_ 5y agoContrast Rust with JavaScript. It is so very easy to get started with. Then come compilers and transpilers, different ways of importing, bundling, packaging, and consuming, all the ways those things mix and interact, myriad "magic" hacks your dependencies are doing behind the scenes to monkey-patch the environment, global APIs, and even other dependencies. It's like building on top of a pile of rubble, piled over more layers of rubble, riddled every which way with critical electrical and water lines. It can be an unmitigated hellscape.