Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
元phperから見たGoの良いところ
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
chiroruxx
April 12, 2024
Technology
110
0
Share
元phperから見たGoの良いところ
2024/04/11 Go Connect #0 で発表した資料です。
chiroruxx
April 12, 2024
More Decks by chiroruxx
See All by chiroruxx
初心者エンジニアから中級者エンジニアになるためにオススメの1冊
chiroruxx
0
110
Laravelのパッケージ全部紹介する
chiroruxx
2
110
Gopher のための「自由な話し合い」ワークショップ
chiroruxx
0
33
PHPをGoで動かす
chiroruxx
0
87
Goを使ってTDDを体験しよう!
chiroruxx
1
960
今ならできる!PhpStormプラグイン開発
chiroruxx
0
93
Go Connectへの想い
chiroruxx
0
210
eBPF with PHPをさわる
chiroruxx
0
170
sl完全に理解したつもり
chiroruxx
0
160
Other Decks in Technology
See All in Technology
AI時代 に増える データ活用先
takahal
0
230
20年前の「OSS革命」に学ぶ AI時代の生存戦略
samakada
0
440
Eight Engineering Unit 紹介資料
sansan33
PRO
3
7.3k
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
74k
AIはハッカーを減らすのか、増やすのか?──現役ホワイトハッカーから見るAI時代のリアル【MEGU-Meet】
cscengineer
0
160
Keeping Ruby Running on Cygwin
fd0
0
160
コードや知識を組み込む / Incorporate Code and Knowledge
ks91
PRO
0
150
弁護士ドットコム株式会社 エンジニア職向け 会社紹介資料
bengo4com
1
160
[最強DB講義]推薦システム | 基礎編
recsyslab
PRO
1
170
はじめての MagicPod生成AI機能 機能紹介から活用方法まで
magicpod
0
100
AzureのIaC管理からログ調査まで、随所に役立つSkillsとCustom-Instructions / Boosting IaC and Log Analysis with Skills
aeonpeople
0
230
#jawsugyokohama 100 LT11, "My AWS Journey 2011-2026 - kwntravel"
shinichirokawano
0
350
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.8k
Automating Front-end Workflow
addyosmani
1370
200k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.4k
Testing 201, or: Great Expectations
jmmastey
46
8.1k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
320
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
370
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
100
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
190
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
280
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の設定
まとめ
まとめ 良かった! 多値返却・タプル代入 ゼロ値 遅延関数呼び出し
思ったよりも・・・ 型 フォーマット