|
|
|
|
|
by hknmtt
999 days ago
|
|
I am a Go fan and have been coding in it for years, but this crap: func Clone[S ~[]E, E any](s S) S {
return append(s[:0:0], s...)
} looks just like Rust, which has the fugliest syntax I have ever seen. Personally I use maybe 3 or 4 generic functions to work with arrays(oh, sorry SLICES), otherwise I do not touch them. Could not care less about them and all that noise they caused. |
|
The rust one does have "&**self", which looks a little strange perhaps, but overall seems simpler than the go one.