Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
元phperから見たGoの良いところ
Search
chiroruxx
April 12, 2024
Technology
0
110
元phperから見たGoの良いところ
2024/04/11 Go Connect #0 で発表した資料です。
chiroruxx
April 12, 2024
Tweet
Share
More Decks by chiroruxx
See All by chiroruxx
Gopher のための「自由な話し合い」ワークショップ
chiroruxx
0
13
PHPをGoで動かす
chiroruxx
0
67
Goを使ってTDDを体験しよう!
chiroruxx
1
740
今ならできる!PhpStormプラグイン開発
chiroruxx
0
63
Go Connectへの想い
chiroruxx
0
190
eBPF with PHPをさわる
chiroruxx
0
140
sl完全に理解したつもり
chiroruxx
0
130
命名をリントする
chiroruxx
1
920
良い命名かを調べるリンターを作った + α
chiroruxx
0
140
Other Decks in Technology
See All in Technology
20251222_サンフランシスコサバイバル術
ponponmikankan
2
140
半年で、AIゼロ知識から AI中心開発組織の変革担当に至るまで
rfdnxbro
0
140
MySQLとPostgreSQLのコレーション / Collation of MySQL and PostgreSQL
tmtms
1
1.2k
Strands AgentsとNova 2 SonicでS2Sを実践してみた
yama3133
1
1.8k
AWSインフルエンサーへの道 / load of AWS Influencer
whisaiyo
0
210
2025年のデザインシステムとAI 活用を振り返る
leveragestech
0
170
アプリにAIを正しく組み込むための アーキテクチャ── 国産LLMの現実と実践
kohju
0
220
Microsoft Agent Frameworkの可観測性
tomokusaba
1
110
なぜ あなたはそんなに re:Invent に行くのか?
miu_crescent
PRO
0
200
Connection-based OAuthから学ぶOAuth for AI Agents
flatt_security
0
360
Amazon Quick Suite で始める手軽な AI エージェント
shimy
1
1.8k
20251218_AIを活用した開発生産性向上の全社的な取り組みの進め方について / How to proceed with company-wide initiatives to improve development productivity using AI
yayoi_dd
0
650
Featured
See All Featured
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
0
63
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
Design in an AI World
tapps
0
99
Why Our Code Smells
bkeepers
PRO
340
57k
Fireside Chat
paigeccino
41
3.8k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
0
130
Scaling GitHub
holman
464
140k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
57
37k
Unsuck your backbone
ammeep
671
58k
The Spectacular Lies of Maps
axbom
PRO
1
400
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.8k
Transcript
元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の設定
まとめ
まとめ 良かった! 多値返却・タプル代入 ゼロ値 遅延関数呼び出し
思ったよりも・・・ 型 フォーマット