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
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
430
初心者エンジニアから中級者エンジニアになるためにオススメの1冊
chiroruxx
0
130
Laravelのパッケージ全部紹介する
chiroruxx
2
140
Gopher のための「自由な話し合い」ワークショップ
chiroruxx
0
51
PHPをGoで動かす
chiroruxx
0
110
Goを使ってTDDを体験しよう!
chiroruxx
1
1.2k
今ならできる!PhpStormプラグイン開発
chiroruxx
0
120
Go Connectへの想い
chiroruxx
0
240
eBPF with PHPをさわる
chiroruxx
0
200
Other Decks in Technology
See All in Technology
Pavlokで始める電撃駆動開発
sgrsn
0
170
AIエージェントを前提としたプラットフォーム エンジニアリング:GKEで作るAgent-Ready Golden Path
legalontechnologies
PRO
1
200
toio・myCobotでフィジカルAIっぽいことを行うための検討(とりあえず調査) / フィジカルAI LT(IoTLTによる開催)
you
PRO
0
290
[MIRU26] Open-Vocabulary Intention-Guided Object Detection in Diverse Scenes
keio_smilab
PRO
0
140
Retriever と Reranker、結局どうする?
kazuaki
3
680
Software Supply Chain Attackからクラウド環境を守るためにできること
lhazy
2
170
Service Connect 上のサービスに ECS Service の外側から到達できなかった話
ota1022
1
130
サイバー捜査員研修(前半)
nomizone
1
1.8k
Breaking the Seal: Static Deobfuscation of Compiled V8 JavaScript Bytecode Malware
hshrzd
0
550
Atlassian Cloudサポート業務でのAIエージェント活用事例
smt7174
0
470
クラウドセキュリティ入門 ~安全なクラウド利用のための基礎知識~
lhazy
10
7.8k
Redmine 7.0 新機能・機能強化解説(OSC2026京都ダイジェスト版)
vividtone
1
190
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
42
3.1k
Documentation Writing (for coders)
carmenintech
77
5.4k
Optimizing for Happiness
mojombo
378
71k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
Claude Code のすすめ
schroneko
67
230k
AI: The stuff that nobody shows you
jnunemaker
PRO
9
880
How to make the Groovebox
asonas
2
2.3k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
Being A Developer After 40
akosma
91
590k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Mind Mapping
helmedeiros
PRO
1
300
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の設定
まとめ
まとめ 良かった! 多値返却・タプル代入 ゼロ値 遅延関数呼び出し
思ったよりも・・・ 型 フォーマット