Hello and welcome back to TechCrunch Space. What a week! In the same seven-day period, we watched Boeing’s Starliner launch astronauts to space for the first time, and then we…
![TechCrunch | Startup and Technology News](https://cdn-ak-scissors.b.st-hatena.com/image/square/92584d6251feb0822f349cf0211361b2833c9939/height=288;version=1;width=512/https%3A%2F%2Ftechcrunch.com%2Fwp-content%2Fuploads%2F2018%2F04%2Ftc-logo-2018-square-reverse2x.png)
今日こんなツイートをした。 @mattn_jp よろしければベターな理由をm(_ _)m 名前空間を短くする作法なのはわかるのですがメモリやGCやコンパイラなど、どの辺に優しい感じですか? — Ryuji IWATA (@qt_luigi) April 5, 2017 qt_luigi さんからどうしてかを聞かれたので説明したいと思います。 golang では宣言した位置で初めて自動変数としてメモリが確保され、ゼロクリアされます。 for i := 0; i < b.N; i++ { var foo Foo bar, err := doSomething() if err != nil { continue } foo.v = bar fmt.Fprintln(ioutil.Discard, foo) } なので例えばこの様なコードで doSomething() が err を返した場合、
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く