3 ms·
Spot on. There is a difference between "Programming language X tutorial" and "Programming tutorial using language X". The former being for someone who wants to
by exDM69 15y ago
Spot on. There is a difference between "Programming language X tutorial" and "Programming tutorial using language X". The former being for someone who wants to learn a new language (but probably knows some programming) while the latter is for people learning their first language.
This article seems to suggest that programming language tutorials should always be targeted at people with zero knowledge about programming or computer science. And he also seems to suggest that all readers are assumed idiots.
In the OP's view, the description of associative arrays as a primary data structure in Lua is not important. This depends a lot on the audience. For me the description about associative arrays was very important, since I want to know how the Lua interpreter works (esp. important for Lua since it's often used as an embedded language).
Same thing goes for the OP's complaint about Haskell and laziness. Laziness is a very central concept to Haskell so it makes sense to introduce it early on.
The OP says: "Programming language tutorials shouldn't be about learning languages. They should be about something interesting, and you learn the language in the process." I really disagree on this one. I don't want to spend time going through yet another badly written beginner tutorial if I want to learn a new language.
- qznc 15y agoI agree with your distinction. However, the paragraph from the Lua manual still shows sloppy technical writing. Terms should be defined before they are used. Using another technical term is not a good description. For example, coming from Python an "associative array" would have to be called a "dictionary". For the Java and C++ programmers it would be a Map. Better: The table type provides storage of values under certain keys. Lua uses tables to represent ordinary arrays, sets, records, queues, and other data structures, in a uniform way. For example, a table can be used as an array, since it can store arbitrary data under index numbers as keys.
- exDM69 15y ago> However, the paragraph from the Lua manual still shows sloppy technical writing. That may be true, but we just have to live with it. We can't expect every piece of software to be documented properly (or even at all). > For example, coming from Python an "associative array" would have to be called a "dictionary". For the Java and C++ programmers it would be a Map. I think the term "associative array" is used here (as well as in PHP docs) because it's distinct from Python-style "dictionaries" or Java/C++ "maps" in that it's the only data structure used in Lua. There's no lists or sets like in Python. I think this is the intent that the manual wanted to portray.