$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
LT Slide 2025-04-22
Search
Shigeki Shoji
April 22, 2025
Technology
0
170
LT Slide 2025-04-22
#kanjava
Shigeki Shoji
April 22, 2025
Tweet
Share
More Decks by Shigeki Shoji
See All by Shigeki Shoji
2025-12-11 nakanoshima.dev LT
takesection
0
39
アジャイルテストで高品質のスプリントレビューを
takesection
0
180
Introduction to kanjava
takesection
0
100
Instructional Designer
takesection
0
150
Zero to Hero
takesection
0
240
Fargateを使った研修の話
takesection
0
330
20240730_kanjava.pdf
takesection
0
160
JavaのJCP会員になろう
takesection
0
110
JAWS-UG Okayama 2024 LT
takesection
0
120
Other Decks in Technology
See All in Technology
日本Rubyの会の構造と実行とあと何か / hokurikurk01
takahashim
4
880
Kubernetes Multi-tenancy: Principles and Practices for Large Scale Internal Platforms
hhiroshell
0
110
モバイルゲーム開発におけるエージェント技術活用への試行錯誤 ~開発効率化へのアプローチの紹介と未来に向けた展望~
qualiarts
0
650
グレートファイアウォールを自宅に建てよう
ctes091x
0
140
Sansanが実践する Platform EngineeringとSREの協創
sansantech
PRO
2
510
A Compass of Thought: Guiding the Future of Test Automation ( #jassttokai25 , #jassttokai )
teyamagu
PRO
1
240
形式手法特論:CEGAR を用いたモデル検査の状態空間削減 #kernelvm / Kernel VM Study Hokuriku Part 8
ytaka23
2
430
Oracle Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
2
110
最近のLinux普段づかいWaylandデスクトップ元年
penguin2716
1
650
Challenging Hardware Contests with Zephyr and Lessons Learned
iotengineer22
0
110
MapKitとオープンデータで実現する地図情報の拡張と可視化
zozotech
PRO
1
120
21st ACRi Webinar - Univ of Tokyo Presentation Slide (Shinya Takamaeda)
nao_sumikawa
0
120
Featured
See All Featured
Making Projects Easy
brettharned
120
6.5k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
710
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
How STYLIGHT went responsive
nonsquared
100
5.9k
Fireside Chat
paigeccino
41
3.7k
Thoughts on Productivity
jonyablonski
73
5k
Git: the NoSQL Database
bkeepers
PRO
432
66k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Faster Mobile Websites
deanohume
310
31k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
Transcript
再帰関数 2025年04月22日 Shigeki Shoji
庄司重樹 Instructional Designer 受賞歴 2024 Japan AWS All Certifications Engineers
2023 Japan AWS Top Engineers
このコードを見て不安になりますか? 3 def hoge: Unit = { val line =
StdIn.readLine("入力(終了したいときは exit と入力): "); if (line != "exit") { hoge; } }
スタックオーバーフローになるのでは? • コードがコンピュータの中でどのように処理されるかを認識し て、コンピュータに寄り添ったコードを書いてませんか? • コードがどういう問題を起こすかを想像して書くよりも、もっと直感 的に人間中心にしたい。もしそれが深刻な問題を起こすのであれば、 コンパイラなり処理系が警告するか、可能な限り自動的に問題が起こ らない動作になるようにしてほしい 4
Scalaなら末尾再帰が使用可能 5 import scala.annotation._; @tailrec def hoge: Unit = {
val line = StdIn.readLine("入力(終了したいときは exit と入力): "); if (line != "exit") { hoge; } } コンパイル後のコードはループに最適化され、繰り返し回数 が原因のスタックオーバーフローは発生しない
6 ありがとうございました