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
元phperから見たGoの良いところ
Search
chiroruxx
April 12, 2024
Technology
130
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
元phperから見たGoの良いところ
2024/04/11 Go Connect #0 で発表した資料です。
chiroruxx
April 12, 2024
Transcript
18 slides
元phperから見た Goの良いところ 2024/04/11 Go Connect #0
自己紹介 ちひろ X: @chiroruxxxx 株式会社モリサワ 1年前に転職して
phperからgopherに
Goの良い ところ Goいいな!と思ったポイントを3つほど紹介したいと思います 思ったよりもあんまり・・・というところも紹介します
余談: 八方美人
いいな! と思ったポイント
多値返却・タプル代入
多値返却 タプル代入 Goの根幹を支える機能 多値を返したいことは多い PHPでは配列(マップ)で無理やり多値を返すコードも・・・ 乱用注意
ゼロ値
ゼロ値 便利すぎる nilチェック、デフォ値の設定など メインロジックと離れたコードを削れる Cmp.Or()でより価値が高まるか たまにバグのもとになる
遅延関数呼び出し
遅延関数 呼び出し defer が便利 関数切り出しのタイミングにもなる
思ったよりも・・・ なポイント
型
型 型による恩恵はさほど変わらず 現在のPHPは型のディストピア 少しでも緩い型を書くと静的解析に怒られる Goはジェネリクス・ユニオン・インターセクション型が限定的
今後に期待!
フォーマット
フォーマット 標準のフォーマッタがある(gofmt) プロジェクト横断で同じフォーマットでコードを読める!? ・・・という夢があった プロジェクトごとに違うgolangci-lintの設定
まとめ
まとめ 良かった! 多値返却・タプル代入 ゼロ値 遅延関数呼び出し
思ったよりも・・・ 型 フォーマット
More Decks by chiroruxx
See All by chiroruxx
Contextとはなにか
chiroruxx
1
530
初心者エンジニアから中級者エンジニアになるためにオススメの1冊
chiroruxx
0
180
Laravelのパッケージ全部紹介する
chiroruxx
2
220
Gopher のための「自由な話し合い」ワークショップ
chiroruxx
0
65
PHPをGoで動かす
chiroruxx
0
130
Goを使ってTDDを体験しよう!
chiroruxx
1
1.5k
今ならできる!PhpStormプラグイン開発
chiroruxx
0
140
Go Connectへの想い
chiroruxx
0
250
eBPF with PHPをさわる
chiroruxx
0
220
Other Decks in Technology
See All in Technology
思考過程から秘密が漏れる:Amazon Bedrock上のKimi K3を5つの方法で攻めたら、25回中22回漏洩した話
yama3133
1
170
農家は秘伝のタレを知らない - NOBODY KNOWS THE HIDDEN SOURCE - Kaggriculture 3rd Place Solution
masspeaks
2
460
属人化したISMS運用をGitHubとAIで仕組み化した1年間の記録
sioncojp
4
2.7k
人の努力に頼らないセキュリティをエンジニアリングする在り方 / An approach to engineering security that does not rely on human effort
carta_engineering
0
120
Gov-JAWS#9 統合監視機能のマネージドサービス化+AIによる障害時自動調査
fj_yoshimura_kosuke
0
180
Sonnetだけで業務はまわる?
kintotechdev
1
140
81天的 AI Agent 軟體開發團隊治理實務分享
regionbbs
0
180
異夢同船〜異なる夢でも同じ船でなんとかする〜
fortegp05
1
430
2026-11-16 JAWS-UG コンテナ支部 #31 ゆるLT大会 ECR のライフサイクルポリシーを いい感じに設定したい / ECR Lifecycle policy
masasuzu
1
140
パスワードのない鍵で、 データを手元に置く
ginjihayashi
0
190
MCPでネットワーク障害調査を自動化する前に直すべき3つのこと
yama3133
0
480
仕様と現実の間で落とし所を探るリモートMCPの認証・認可 — Sansanの認証基盤における課題と実践
sansantech
PRO
2
330
Featured
See All Featured
What the history of the web can teach us about the future of AI
inesmontani
PRO
3
810
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
430
The Pragmatic Product Professional
lauravandoore
37
7.5k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.4k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
530
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
550
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
1
300
YesSQL, Process and Tooling at Scale
rocio
174
15k
Between Models and Reality
mayunak
4
580
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
60k
The Spectacular Lies of Maps
axbom
PRO
1
1.1k