On Tue, Mar 2, 2021 at 9:37 AM Jad wrote:
>
> I'm new to Go and I would like to understand why the compilation process,
> both the compiler and linker, does raise an error for a declared but not used
> variable at funcs level in order to ensure clean code while the linker does
> not raise this
Many packages expose useful variables that are not being used themselves,
like useful defaults for example. I guess this would be an argument in
favor of limiting this kind of behaviour to inside the functions.
A good example is image/color/pallete.
Also, there is some shenanigans on estimating t
Hi,
I'm new to Go and I would like to understand why the compilation process,
both the compiler and linker, does raise an error for a declared but not
used variable at funcs level in order to ensure clean code while the linker
does not raise this error during the build process for declared but