News for hackers. Stuff that matters.
Re:Deadcode: Finding unreachable functions in Go by lynndotpy on Tuesday January 23, 2024 @02:43PM (#39108636)
When I was doing Genuary in Rust, I started with a template that I would add some helper functions too that I could anticipate I would need for the art. Easy ones like "xy_to_polar".

I would do the first-time compile on this template and then add things iteratively.

Go would be a nonstarter for this experimental/artistic code, because I would usually have dead code in my "toolbox" to iterate and experiment with until I liked the end product.

Re:Deadcode: Finding unreachable functions in Go by dewey on Tuesday January 23, 2024 @02:45PM (#39108676)
In reality you just comment out the block, in day-to-day work it really is a non-issue in my experience.
Re:Deadcode: Finding unreachable functions in Go by lynndotpy on Saturday January 27, 2024 @09:39AM (#39155907)
I get what you're saying, but I don't share your experiences.

My reality is that I don't comment and uncomment lines, and I don't want to start. Commenting out a block of code takes more time and it's still unused code.

It really feels like a "Go is designed around problems Google had within Google" design choice.