| > That is incorrect. It issues a runtime panic, which is the same as the syntax for Rust that will do the same thing. As I said before, having explicit syntax for it is a very different thing than having a method for it on a generic type that isn't specific to it > It does do that! It's done it since the beginning That's good! Still isn't required though, and having a safe way to do something doesn't mean that the unsafe way doesn't exist > It's not a cast, though. It's a "type assertion". It can't convert. Okay? It still lets you get errors due to the type system not preventing them > It is definitely type-safe. The "type safe" that it is is less rich and complex than Rust or Haskell, but it is type safe within its type system I agree that type safety is a spectrum, and very few languiages are fully type safe. I probably should have been more clear that I wasn't saying that Go wasn't 100% unsafe, but I thought it would be obvious I wasn't saying that. Clearly that's not the case. > If it weren't, it would never had needed generics... it would be a dynamic language and they build generics in so deep they aren't even "generics", they're just how the language works at all. The whole reason Go needs generics is precisely that it isn't type-unsafe. I'm not sure what this means; pretty much every statically typed language gets benefits from generics, and they're clearly not all equally type safe, so I don't know what this is supposed to convince me of. > You need to stop talking about Go. You don't know it. I don't know everything about Go, that's true. Go doesn't have a special definition of type safety though, and recognizing places where it isn't type safe doesn't require complete knowledge of the entire language. |