4 ms·
It'd be nicer if there was some way of selection which language is shown on the left side. Expecting readers to understand both C++ and Kotlin and Java and Java
by mlindner 4y ago
It'd be nicer if there was some way of selection which language is shown on the left side. Expecting readers to understand both C++ and Kotlin and Java and Javascript will be a stretch for most.
- clumsysmurf 4y agoI thought there would be an option to select just one, but seems they are indeed just random smatterings of rust vs { Typescript, Javascript, Kotlin, Java, C, and C++ }
- 86J8oyZv 4y agoThese features aren’t each supported by all those languages though. I also don’t think expecting a dev interested in Rust to understand several C-like languages is unreasonable, at least enough ti understand these straightforward example cases.
- nine_k 4y agoAFAICT, the expectation is that the reader knows at least one modern programming language from the list, and maybe is acquainted in passing with a couple of others. So at least some comparisons should click. (They seemingly don't use more apt comparisons with OCaml and Haskell, for instance, not expecting the reader to know them.)
- mlindner 4y agoJavascript I've seen a decent amount and tweaked/edited some of code in it but I wouldn't say I "know" it at all. Kotlin I've never even seen before and I know literally nothing about the language. Java I wrote a bit of in high school but haven't touched it in 15 years. So yeah there's quite a lot that people wouldn't know.
- nine_k 4y agoWell, Golang? Pascal? They have similar ways of declaring data types, for instance. This guide is not going to magically teach you Rust is there's nothing to compare it to; there are other guides to help those without a background. But it could somehow help people who already have similar concepts in their mind to link them to corresponding concepts in Rust.
- mlindner 4y agoGolang I've seen code of, but never worked with it. Pascal I've never seen before.
- Jtsummers 4y agoYou've said what languages you don't know, what languages do you know?
- mlindner 4y agoC, C++, and Python are all languages I've worked professionally in. I'm in the process of learning Rust.
- kika 4y agoMy experience with Java ended circa 2000 and I never wrote a single line in Kotlin. But I read these examples without noticeable issues.
- heavyset_go 4y agoAll of those languages adopt the C-like syntax and semantics, it shouldn't be hard for someone with familiarity with languages in that family to deduce what's being conveyed in code in languages they might not have experience with.