6 ms·
>(2) Functions are presented before lists. While it might not make the most sense for a beginner still learning the fundamentals to be taught lists before func
by Aengeuad 7y ago
>(2) Functions are presented before lists.
While it might not make the most sense for a beginner still learning the fundamentals to be taught lists before functions it's generally advantageous for introductory language books to focus on what the language excels at. But of course this is a fundamentals book and not every book needs to be general purpose!
Some examples of where this holds true: The Rust Programming Language introduces ownership concepts, a difficult topic even outside of Rust, immediately after the chapter on fundamental concepts like the data types, functions, and control flow. It could be argued that such a concept needs to be introduced early to understand the language more, although you see similar things with OOP being emphasised very early on in Java on the tutorials on the Sun/Oracle website. Any introduction to Perl will be very string processing heavy, and Ruby introductions, like Python, will introduce lists/splicing very early on. It's easier to appreciate as you pick up more languages.
- anongraddebt 7y agoMakes sense. Thanks for the insight!