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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
chiroruxx
April 12, 2024
Technology
120
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
More Decks by chiroruxx
See All by chiroruxx
Contextとはなにか
chiroruxx
1
490
初心者エンジニアから中級者エンジニアになるためにオススメの1冊
chiroruxx
0
150
Laravelのパッケージ全部紹介する
chiroruxx
2
170
Gopher のための「自由な話し合い」ワークショップ
chiroruxx
0
57
PHPをGoで動かす
chiroruxx
0
120
Goを使ってTDDを体験しよう!
chiroruxx
1
1.4k
今ならできる!PhpStormプラグイン開発
chiroruxx
0
130
Go Connectへの想い
chiroruxx
0
250
eBPF with PHPをさわる
chiroruxx
0
210
Other Decks in Technology
See All in Technology
脆弱性診断って、何をしているの? 〜弱点を見つけて、会社の改善につなげるまで〜
keeg
0
770
検証フェーズはAIの回答を判断するための学習機会
toru_kubota
2
550
AI時代に必要な脅威モデリング― 変化の速度に負けない理解とリスク判断
masakane55
5
1.2k
ビジネスを止めない技術的負債の返済のための戦略とその手法 - 技術的負債と向き合う / Complexity and Simplicity
soudai
PRO
3
680
ai_cording_with_k8s_knowledge.pdf
mochizuki875
1
320
1万名の社員が使う認証基盤で どう信頼性を担保するか?
kairim0
0
220
AgentCoreで実践するハーネスエンジニアリング
yakumo
1
290
事業活動を AI Ready にする攻めと守りのデータエンジニアリング / data-engineering-for-ai-ready-business
pei0804
6
2.3k
V8のArray.prototype.flatを最大約20倍速くするまでと、巨大OSSへの大規模コミットの道のり
riyaamemiya
0
110
初対面のメンバーがチームを組み、Claude Codeでゼロからサービスをリリース
mkdev10
1
110
FOSS4Gを活用した自治体業務DXの試み
470715
0
140
並行性の問題を防げ!実践トランザクション入門
occhi
0
280
Featured
See All Featured
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
270
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.1k
The Limits of Empathy - UXLibs8
cassininazir
2
710
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
Building Adaptive Systems
keathley
44
3.2k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
How to train your dragon (web standard)
notwaldorf
96
6.9k
HDC tutorial
michielstock
2
950
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
350
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
Designing Powerful Visuals for Engaging Learning
tmiket
1
600
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の設定
まとめ
まとめ 良かった! 多値返却・タプル代入 ゼロ値 遅延関数呼び出し
思ったよりも・・・ 型 フォーマット