I like having a little visual separation of the type names from the variables in Go.
I’ve been playing with the following:
var target (int64) = 600851475143
var largest (int64) = 0
var i (int64)
So far it compiles correctly and I don’t see any difference in the result of my program run.
Is this dangerous? Is there any semantic difference between the above and the below?
var target int64 = 600851475143
var largest int64 = 0
var i int64
Thanks
There is no semantic difference but you may find yourself fighting against
go fmtso I’m thinking it’s not worth it.