On Wed, Oct 11, 2023 at 8:11 PM Torsten Bronger <
[email protected]> wrote:
> Then, all boils down to the fact that you can’t pass []float64 as an
> []any. To be honest, I still don’t fully understand why this is
> forbidden
What would this do?
func F(s []any) {
s[0] = "Foo"
}
func main() {
s := []int{1,2,3,4}
F(s)
fmt.Println(s)
}
> , so I just accept that the language does not allow it.
>
> Thanks to both of you!
>
> Regards,
> Torsten.
>
> --
> Torsten Bronger
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/87il7dni96.fsf%40physik.rwth-aachen.de
> .
>
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/CAEkBMfE_pmAa5XNAZgaHv82yFtzVNfQ7J6BRhSCEoE4punM0bQ%40mail.gmail.com.