It distresses me that the specs on w3.org are so hard to read for the average developer. It's great to see how MDN focuses on simplicity, readability, and usable examples.
It distresses me that the specs on w3.org are so hard to read for the average developer. It's great to see how MDN focuses on simplicity, readability, and usable examples.
I think this is actually fairly important for two reasons. The first is simply that unreadable specs are just as bug prone as unreadable code, but the second is that this increases the distance between the web as specced and the [much much much] larger developer community, and things like <img srcset> / <picture> show the benefit of having less of a communications chasm between those groups.
That doesn’t mean that specs can’t be precise but simply that good technical writing can accommodate a wide audience.
It would be a good exercise to require the public documentation parsable by humans. At least when it gets beyond the proposal stage.
Web specs recently have sacrificed the former to handle the latter, not least because past experience with web specs that sacrificed the latter to do the former was so horrible...
It's been years since I stopped contributing to and reading MDN, but this editorial stance seems to have disappeared, unfortunately.
For ```list``` it says:
Lists implement all of the common and mutable sequence operations. Lists also provide the following additional method:
...where "common" and "mutable" are links.
Meaning: the methods of lists are strewn across three different location, four if you count the constructors above this sentence.
Many operations on a list are much the same as the methods on a tuple, so they are documented in one place – section 4.6.1 "Common Sequence Operations" – rather than duplicated in both the list and tuple documentation. Similarly, many of the methods supported by list are also supported by bytearray, so they are documented in 4.6.3 "Mutable Sequence Types" rather than duplicated. To get from the section on lists to the two sections describing the available methods involves pressing page-up twice. Hardly "strewn across three different location", and there's always help(list) if you really want a list of every supported method.
*all the ones you'll use regularly, at least
Having a single list of all functions in python makes very little sense for the simple reason that you'd not be able to find what you're looking for in that list so you might as well just use the search in the first place.
Side note: if there's a specific function you'd like to get the documentation for you can get that easily from the interactive python prompt with the "help" function:
>>> help(zip)
And I fail to see the "missing examples". While it's true that most modules don't contain examples for every single function they usually contain a few examples for the overarching concept.So which part exactly of the python docs is bad? IMO they are, by far, the best docs any programming language has.
[1] https://docs.python.org/3/library/functions.html [2] https://docs.python.org/3/py-modindex.html
So here's the standard library page for Python lists: https://docs.python.org/3/library/stdtypes.html#sequence-typ...
As a new python programmer, how am I supposed to know that the comprehensive API docs are actually in the tutorial? https://docs.python.org/3.1/tutorial/datastructures.html
Compare that to Javadocs (something Java got right!): https://docs.oracle.com/javase/8/docs/api/java/util/List.htm..., and .NET is similar. Ruby is also ok in this regard: https://ruby-doc.org/core-2.2.0/Array.html
(Javascript is a mess of course!)