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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
More Decks by chiroruxx
See All by chiroruxx
Contextとはなにか
chiroruxx
1
520
初心者エンジニアから中級者エンジニアになるためにオススメの1冊
chiroruxx
0
170
Laravelのパッケージ全部紹介する
chiroruxx
2
220
Gopher のための「自由な話し合い」ワークショップ
chiroruxx
0
63
PHPをGoで動かす
chiroruxx
0
130
Goを使ってTDDを体験しよう!
chiroruxx
1
1.4k
今ならできる!PhpStormプラグイン開発
chiroruxx
0
140
Go Connectへの想い
chiroruxx
0
250
eBPF with PHPをさわる
chiroruxx
0
220
Other Decks in Technology
See All in Technology
[General] 개발자로 해외 기업에서 일하기
skydoves
1
290
Software Engineering in an AI-Driven World
erikjhordan_rey
0
110
攻撃 3 時間 vs 復旧 10 時間。アクセスキー流出の非対称性を体感するために CTF を作った話
kazzpapa3
1
140
SLOを阻む不安
sraku2159
0
220
Don't write the architecture only in the prompt.
neohsu
0
310
Microsoft Entra Kerberos で実現するクラウド デバイス管理
tamaiyutaro
1
210
Deep Data Security 機能解説
oracle4engineer
PRO
3
1k
渡米前の準備を制す!re:Invent 2026徹底準備術 / The Ultimate Preparation Guide for re:Invent 2026
yuj1osm
1
540
AI AgentによるEmbedded SREの取り組み
tgidgd
1
340
現場を動かすAIエージェント#2_製造業現場でのAI活用から見た、ハマる罠と実践知
kintotechdev
2
140
IBC 2026 動画技術関連レポート / IBC 2026 Report
cyberagentdevelopers
PRO
2
180
Flutter Webを「SDK」として配る — 50以上のゲームを支える埋め込みアーキテクチャ
masayukisuda
0
180
Featured
See All Featured
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
970
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
580
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
620
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
370
Making the Leap to Tech Lead
cromwellryan
135
10k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
560
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
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の設定
まとめ
まとめ 良かった! 多値返却・タプル代入 ゼロ値 遅延関数呼び出し
思ったよりも・・・ 型 フォーマット