Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
if let temporary scopeについて
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
skanehira
March 12, 2025
210
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
if let temporary scopeについて
skanehira
March 12, 2025
More Decks by skanehira
See All by skanehira
Reactにおける 良いコンポーネントテストとはなにか
skanehira
1
440
vimconf2025.pdf
skanehira
0
51
findy-ai-terminal.pdf
skanehira
2
520
Rustから学ぶ 非同期処理の仕組み
skanehira
1
440
about_gorilla.vim.pdf
skanehira
0
150
build-debugger-in-rust.pdf
skanehira
1
290
Findy感謝祭2024 LT
skanehira
0
160
Rustではじめる負荷試験
skanehira
6
2.5k
Wellcome Vim World
skanehira
3
690
Featured
See All Featured
Docker and Python
trallard
47
4.2k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
3
4.3k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
We Have a Design System, Now What?
morganepeng
55
8.3k
How to Ace a Technical Interview
jacobian
280
24k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
850
Discover your Explorer Soul
emna__ayadi
2
1.3k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
エンジニアに許された特別な時間の終わり
watany
109
250k
Transcript
JGMFU UFNQPSBSZTDPQFʹ͍ͭͯ
自己紹介 ゴリラです。 株式会社テックリードという会社をやってい ます。 主にフロントエンド・バックエンドエンジニ アとして仕事しています。 好きなものはVim, Go, Rust, TypeScript,
Deno, Wasm などです。 X : https://x.com/gorilla0513 zenn : https://zenn.dev/skanehira GitHub: https://github.com/skanehira
RustでWasm Runtimeを実装する本を書いた https://zenn.dev/skanehira/books/writing-wasm-runtime-in-rust
自己紹介はこれくらいで…
Rust 1.85 & 2024 Edition リリースめでたい 🎉
本日は2024 Editionの 「if let temporary scope」 について軽く紹介
JGMFUͷ͓͞Β͍ w JGMFUQBUFYQS\^FMTF\^ ͱ͍͏ߏจ w ӈͷΑ͏ʹNBUDIΑΓศརͳ໘ ͕͋ΔͷͰͨ·ʹ͏
ͪΐͬͱ2VJ[ w FOEग़ྗ͞Ε·͔͢ʁ
͑ w &EJUJPOͰFOEग़ྗ͞ Εͳ͍ w &EJUJPOͰFOEग़ྗ͞ ΕΔ
JGMFUͷམͱ݀͠ w ͜ͷྫͰσουϩοΫ͕ى͖Δ w ධՁͷॱ൪ WBMVFSFBE VOXSBQ
4PNF Y JGFMTF
JGMFUͷམͱ݀͠ w WBMVFSFBE VOXSBQ ͷධՁ݁Ռ ͰҰ࣌తʹੜ͞Ε͕ͨFMTFΛൈ ͚Δ·ͰESPQ͞Εͳ͍ w FMTFͷ߹WBMVFXSJUF VOXSBQ
ͰϩοΫղ์·ͪʹͳͬͯσουϩ οΫ
&EJUJPOͰ w WBMVFSFBE VOXSBQ ͷධՁ݁Ռ ͰҰ࣌తʹੜ͞Ε͕ͨFMTFʹೖ ΔલʹESPQ͞ΕΔ w FMTFͷ߹WBMVFXSJUF VOXSBQ
ͰϩοΫΛऔಘͰ͖ΔΑ͏ʹͳΔ
嬉しいけどコード上の変化はなく どこが変わったのか気になる🤔
HIRやMIRをみてみた
)*3.*3ͷ͓͞Β͍ ίϯύΠϧͷେ·͔ͷྲྀΕ w ࣈ۟ղੳͱߏจղੳͯ͠"45ม w "45͔Β)*3ʢߴਫ४தؒදݱʣͷม w )*3͔Β.*3ʢதਫ४தؒදݱʣͷม w .*3͔Β--7.*3ͷม
w --7.*3͔Βίʔυੜ
)*3.*3ͷ͓͞Β͍ ίϯύΠϧͷେ·͔ͷྲྀΕ w )*3 w ܕਪɺτϨΠτղܾɺܕνΣοΫͳͲɺղੳॲཧͷج൫ͱͯ͠׆༻͞ΕΔɻ w .*3 w ϓϩάϥϜΛجຊϒϩοΫ୯Ґͷ੍ޚϑϩʔάϥϑʢ$'(ʣͱͯ͠දݱ͢
Δɻ w आ༻νΣοΫɺσʔλϑϩʔղੳɺ࠷దԽɺఆධՁʢ.*3*ʹΑΔ࣮ߦʣͳ Ͳ
)*3 w ͱͷ)*3QSFMVEF Ҏ֎มΘ͍ͬͯͳ͔ͬͨ
.*3 &EJUJPO
.*3 &EJUJPO
·ͱΊ w &EJUJPOͰJGMFUFMTFͷ࣮࣍ୈͰσουϩοΫ͕ൃ͢Δ߹͕͋Δ w &EJUJPOͰͦΕ͕վળ͞Εͨ w ੜ͞Εͨ.*3ͰFMTFʹೖΔલʹϩοΫΛESPQ͢ΔΑ͏ʹͳ͍ͬͯͨ
ありがとうございました