В 1.23 завезут то, что в моём детстве было ON ERROR GOTO Handler (ну, почти).
🤔15👍3👎2
Если вы зачем-то хотите писать на Go как на Rust’е, то теперь вы можете: https://github.com/borgo-lang/borgo
EDIT: Хотя нет, пока не можете.
EDIT: Хотя нет, пока не можете.
GitHub
GitHub - borgo-lang/borgo: Borgo is a statically typed language that compiles to Go.
Borgo is a statically typed language that compiles to Go. - borgo-lang/borgo
🤔6😢4👍2👎2
I think it would be impractical from a process perspective to add ssa-based analyzers to go vet
Любопытно. nilness checker написали уже давно, но запускать по-умолчанию не будут.
Любопытно. nilness checker написали уже давно, но запускать по-умолчанию не будут.
GitHub
proposal: cmd/vet: enable nilness checker by default · Issue #59714 · golang/go
Summary Consider enabling the nilness linter by default on go vet (and therefore go test). Details The nilness linter searches for potential nil pointer dereferences in code. It is not enabled by d...
🤔2
GitHub
gabyhelp feedback · golang/go · Discussion #67901
I am experimenting with running a new bot @gabyhelp (which I am writing) in the Go issue tracker to try to help automate various mundane things that a machine can do reasonably well. Some aspects o...
🤔7👎3👍1
Ну что ж, молчать про итераторы больше нельзя: https://www.gingerbill.org/article/2024/06/17/go-iterator-design/
www.gingerbill.org
Why People are Angry over Go 1.23 Iterators
NOTE: This is based on, but completely rewritten, from a Twitter post: https://x.com/TheGingerBill/status/1802645945642799423
TL;DR It makes Go feel too “functional” rather than being an unabashed imperative language.
I recently saw a post on Twitter showing…
TL;DR It makes Go feel too “functional” rather than being an unabashed imperative language.
I recently saw a post on Twitter showing…
😢11🤔3👍2
Go 2 не будет… В смысле, все это и так уже давно знали, но теперь даже сам термин останется только в нашей памяти.
GitHub
github: make language change proposal triage less confusing to the outside · Issue #65660 · golang/go
Currently, language change proposals created through the corresponding template are given titles starting with "proposal: Go 2:" and assigned LanguageChange and v2 labels. As an outsider ...
😢4👍3
😢28👍10🤔3
rsc написал тут про поиск багов делением пополам. Сначала про git bisect (который, как я надеюсь, все используют, когда надо), а потом про деление по пространству, не по времени: https://research.swtch.com/bisect
👍7🤔1
Оказывается, кто-то ещё использует GOPATH вместо модулей
GitHub
cmd/go: breaking change in 1.23rc2 with version constraints in GOPATH mode · Issue #68658 · golang/go
Go version go version go1.23rc2 darwin/amd64 Output of go env in your module/workspace: GO111MODULE='auto' GOARCH='amd64' GOBIN='' GOCACHE='/tmp/.gocache' GOENV='...
😢6👎3👍2
How to Go wrong
Новый уникальный блог-пост
GitHub
weak: new package providing weak pointers · Issue #67552 · golang/go
What is a weak pointer? Weak pointers (or weak references, as they are referred to in other languages) allow developers to reference memory without preventing the garbage collector from reclaiming ...
😢6🤔4
How to Go wrong
Решение сначала добавить телеметрию в команду go, а потом решение сделать её opt-in, а не opt-out, вызвало целую бурю эмоций в сообществе. Ответы на этот твит показывают обе стороны: одни продолжают негодовать из-за всего связанного со злым Гуглом, другие…
https://go.dev/blog/gotelemetry
(и через какое-то время после включения запустите
и полюбуйтесь)
(и через какое-то время после включения запустите
go run golang.org/x/telemetry/cmd/gotelemetry@latest view
и полюбуйтесь)
go.dev
Telemetry in Go 1.23 and beyond - The Go Programming Language
Go 1.23 includes opt-in telemetry for the Go toolchain.
Лучшая четверть организаторов GopherCon Russia (не я) делает камерный четырехдневный Go-кэмп в Черногории. С 13-ого по 16-ое октября будет летний лагерь, Kubernetes операторы, горы, PyTorch в Go, отдых, создание игр на Go. Подробности тут, а наш Go-чат делает разыгрыш скидки в 15%.
1👎15👍12🤔2
How to Go wrong
Ооооох https://github.com/golang/go/issues/67552
Ооооох x2: https://github.com/golang/go/issues/67535
GitHub
runtime: add AddCleanup · Issue #67535 · golang/go
Background Go provides one function for object finalization in the form of runtime.SetFinalizer. Finalizers are notoriously hard to use, and the documentation of runtime.SetFinalizer describes all ...
🤔2👍1