Write functional code that increases productivity! Applying iterable programming 👊
What will you learn? 📖
With ES6+, JavaScript has placed a special emphasis on the iterable protocol , replacing imperative code with iterable programming. Protocols such as symbols, iterables, iterators, generators, and promises, async, and await are highlighted. Future versions will continue to evolve these protocols, with async, await, for...await-of, and Async Iterator.
This course, a follow-up to " Functional Programming and JavaScript ES6+, " explores various applications of functional programming and iterable programming. By taking this course, you'll eliminate error-prone imperative code like i++, j++, if, for, and break. Write functional code with fewer errors, higher productivity, and beautiful expressiveness !
The Benefits of Iterable Programming in JavaScript 💡
It is highly composable because it is a code created through a protocol supported at the language level.
You can use error handling supported at the language level.
Makes asynchronous/concurrent programming safer and easier .
You can minimize the amount of code (we also have ideas on how to minimize the amount of code that is converted while transpiling).
The Inconvenience of ES5 Grammar Programming 🥲
Code that relies on i++, j++, if, for, break, and state changes is prone to bugs.
When responding to functional development and planning changes, bugs are likely to occur , making maintenance difficult.
Each developer has a different preferred code style, making it difficult for them to interpret each other's code .
You always have to rewrite the logic, and the number of test cases increases accordingly, which reduces productivity .
A word from a knowledge sharer 😀
Starting around 2008, various functional languages such as Clojure, Elixir, and Scala based on Lisp, iterables, and reactive were created, and many related libraries were created in other languages, and recently, lambdas were applied to Java, Swift, Kotlin, and JavaScript, which are most commonly used in the field, and LISP or FP were introduced to the language itself under the name of streams or iterables. The awareness that functional programming or iterable programming is needed in more diverse situations is spreading, and these technologies are being used naturally in practice .
Functional/iterable programming is being applied to all languages because of its practical value. Iterable programming is a powerful tool for reducing problems and increasing composability. Now, with its application in almost every language, this method has become a language-transcending solution.
JavaScript, in particular, has a remarkably robust set of protocols based on iterables, iterators, generators, and symbols. These protocols tell developers to master the language. I believe the true appeal of ES6+ lies in this "iterable protocol." Iterable programming is a powerful tool that increases productivity, reduces error rates, and enables the creation of maintainable code.
Functional Programming and JavaScript ES6+ We cover ES6+ iterables/iterators/generators/concurrent programming in detail. If you're not familiar with functional/iterable programming, take this course first!
Recommended for these people
Who is this course right for?
Anyone who wants to learn functional programming
Anyone who wants to know how to apply iterable programming
For those who are curious about practical use cases of functional/iterable/concurrency
For those who want to write concise and elegant code
Anyone who wants to take a leap forward as a JS developer
Need to know before starting?
Functional Programming and JavaScript ES6+ Inflearn Lecture
Tôi đã thử viết mã bằng thư viện hàm bằng cách áp dụng các khái niệm tôi đã học ở bài giảng trước, nhưng hàm phụ đã trở nên dài hơn và mã mệnh lệnh chỉ đơn giản được chuyển sang hàm phụ trợ. Có vẻ như mã mệnh lệnh chỉ được đổi thành hàm có điều khiển. câu nói trong đi tôi không thể xóa bỏ cảm giác.
Sau khi nghe bài giảng này, bạn sẽ học được từ các bài giảng trước như một góc nhìn khác về ánh xạ, lọc và rút gọn, thành phần hàm an toàn thông qua các đơn nguyên bằng cách gói các iterables/iterator với các hàm trên và các kỹ thuật trích xuất các hàm có khả năng tái sử dụng cao, trừu tượng hóa chúng và tiếp tục sử dụng chúng. Tôi nghĩ đó là một bài giảng sẽ bù đắp cho 2% mà tôi còn thiếu khi bắt đầu viết mã chỉ sau khi nghe nó. Tôi chưa hiểu hết bài giảng này nhưng tôi sẽ học bằng cách nghe đi nghe lại. Cảm ơn bạn vì bài giảng tuyệt vời.
"Bài giảng hay nhất khiến bạn mong chờ bài giảng tiếp theo"
Đây là gì khi bạn nghe nó lần đầu tiên? Nó hoạt động như thế nào? Mặc dù có rất nhiều câu hỏi,
Khi nghiên cứu từng đoạn mã, bạn sẽ yêu thích sự quyến rũ của ngôn ngữ JavaScript.
Bạn sẽ yêu thích các bài giảng và cách trình bày có cấu trúc tốt.
Tôi đang mong chờ bài giảng tiếp theo khi người hướng dẫn có thời gian rảnh.
có đấy. (Tôi hy vọng bài giảng về cách cùng nhau tạo ra một dự án thực tế sẽ được bổ sung vào lần tới.
Tôi hy vọng như vậy!)
Thật tuyệt khi được xem các trường hợp ứng dụng thực tế của JavaScript chức năng. Tôi đã có thể có được cảm nhận cụ thể hơn về lập trình hàm khi tôi thấy cách lập trình hàm được áp dụng cho các tình huống cần giải quyết trong thực tế và giải quyết bằng mã đẹp mắt, dễ đọc. Trong bài giảng tiếp theo, sẽ rất tốt nếu dạy bạn cách thiết kế và quản lý các phần phụ thuộc khi tạo một dịch vụ hoặc ứng dụng cụ thể bằng cách áp dụng lập trình chức năng. Cảm ơn bạn vì bài giảng tuyệt vời :)
Tôi chạy đến cuối cùng trong thời gian không lâu. Nó thực sự có nhiều thông tin và thú vị.
Có thể cần thực hành một chút để áp dụng nó vào thực tế, nhưng
Liệu có thể áp dụng nó từng chút một giống như lần đầu tiên chúng ta tạo hàm addMaker không?
Tôi đang nghĩ về nó. Cảm ơn Chúc bạn tiếp tục có những bài giảng hay!
Cảm ơn sự nỗ lực của bạn!