전체 글566 [JS 스터디 2023] - 첫 번째 미팅 4월 23일 일요일 JS 스터디 2023 첫 번째 미팅에 참여했습니다. 이터레이터와 이터러블 프로토콜에 대해 학습했습니다. [Symbol.iterator]() 메서드를 반환하는 이터러블 객체, 그리고 next 함수와 done 값에 대한 객체를 반환하는 이터레이터, 이터레이터를 만들기 위한 제너레이터가 있습니다. 이터레이터의 [Symbol.iterator]() 반환 값이 자기 자신이 될 때 well-formed iterator 라고 합니다. 사실 개발을 하면서 크게 고려하지 않은 부분이었는데 ES6 부터 나온 for...of 문을 보면 내부적으로 이터레이터-이터러블 프로토콜이 구현되어 있다는 것을 알게 되었습니다. 그러면 그러한 제너레이터는 어떤 상황에서 활용될 수 있을까 의견을 나누면서 async-awa.. 2023. 4. 23. [Rust 문서 읽기] 9. Error Handling (예외 처리) The Rust Programming Language - Recoverable and Unrecoverable errors - recoverable error - ex) file not found error - type Result - unrecoverable error - ex) index out of range, ... - symptoms of bugs - immediately stop the program - Rust doesn't have exceptions - panic! macro that stops execution when the program encounters an unrecoverable error - Unrecoverable Errors with panic! - Using a pan.. 2023. 2. 18. [Rust 문서 읽기] 8. Common Collections (일반적인 컬렉션) The Rust Programming Language - Storing Lists of Values with Vectors - A vector allows us to store a variable number of values next to each other - only store values of the same type - useful such as the lines of text in a file or the prices of items in a shopping cart - Creating a New Vector - we add a type annotation b/c when aren't inserting any values into vector (rarely) - vec! macro: creat.. 2023. 2. 11. [Rust 문서 읽기] 7. Managing Growing Projects with Packages, Crates, and Modules (모듈) The Rust Programming Language - Module System - Packages: A Cargo feature that lets you build, test, and share crates - Crates: A tree of modules that produces a library or executable - Modules and use: Let you control the organization, scope, and privacy of paths - Paths: A way of naming an item, such as a struct, function, or module - Packages and Crates - Crate: the smallest amount of code th.. 2023. 2. 11. [Rust 문서 읽기] 6. Enums and Pattern Matching (열거형과 패턴 매칭) The Rust Programming Language - Defining an Enum - enum gives us a way of saying a value is one of a possible set of values - Enum Values - we can put data directly into each enum variant - the name of each enum variant that we define also becomes a function that constructs an instance of the enum - each variant can have different types and amounts of associated data - we can put any kind of dat.. 2023. 2. 5. 이전 1 ··· 27 28 29 30 31 32 33 ··· 114 다음 반응형