3 ms·
Worthless functionality in a worthless language. Only topped by the bizarre and unverified claims in its documentation: Most programming languages are pro
by crabbone 3y ago
Worthless functionality in a worthless language. Only topped by the bizarre and unverified claims in its documentation:
Most programming languages are procedural:
Did the author count? -- The answer is a clear and resounding "No". The author pulled this factoid out if his rear end. Maybe. Maybe not. It's not even clear by what's meant by "all languages" -- all possible languages? all languages known to author? all languages used in Github? And why should anyone care about this kind of multitude?
Lisp
Again, people who've never seen any Lisp, or vaguely remember their college days when some course requested from them to write a function to figure out if a string is a palindrome in Scheme think that Lisp is a single language. The author just decided to demonstrate his blistering ignorance by including something that he thought would render him as more experienced than their readers.
Later the author perpetuates all sorts of absurd myths about "functional programming" s.a. increased modularity or ease of debugging. Apparently, author had never used step-debugger nor had he wrote anything in any popular programming language that advertises itself as functional to experience first-hand this "ease" he's talking about. Needless to say that nothing in functional programming prevents programmers from writing long functions... In practice, however, some languages which advertise themselves as "functional" have pathologically bad / hard to read syntax (eg. Haskell), and functions longer than some 10 lines or so become too difficult to understand even to people who believe themselves to be proficient in those languages.
Author is simply lying when he claims that generators are a kind of function, which can be simply verified:
>>> def generate_ints(n):
... for i in range(n):
... yield i
...
>>> type(generate_ints(1))
<class 'generator'>
>>> type(generate_ints(1)).mro()
[<class 'generator'>, <class 'object'>]
>>> isinstance(generate_ints(1), type(generate_ints))
False
Generators and functions are unrelated. Neither is a kind of other.
On top of that, author frequently violates Python's coding conventions (eg. capital letters in variable names, assigning lambdas to variables).
---
But, bottom line: crappy language deserves no better documentation than this.
- eska 3y agoHave a beer, bro