one feature we always take for granted but which is one of Go's best features is the promise of backwards compatibility. It was worth being mentioned, I think
You are incorrect about the changes to comparable. It is not the case that "any" is interchangable with "comparable", the change is that generic code with a "comparable" type parameter now can now accept an interface type (such as "any") as type argument. This means that in a generic function, a type parameter that is restricted by "comparable" is still needed to use the "=="/"!=" operators (or to use the type as the key in a map), but when instantiating the generic code you can now pass an interface type, as an interface type is normally comparable (with runtime caveats). eg: func equal1[T any](x,y T) bool { return x == y } // INVALID (T is not a comparable type) func equal2[T comparable](x, y T) bool { return x == y } // VALID (and unchanged from 1.18) // The main difference is in what is allowed at instantiation var a,b any = 1,2 var c,d any = []int{}, []int{} equal1(a,b) // Always an error (since equal1 can't be compiled) equal2(a,b) // Now OK in 1.20 (fails to compile in go
Great resume as always! A video about unsafe package would be highly appreciated. Also in 2:37 you talk about 3 new functions, but unsafe.SliceData is duplicated (was it meant to be StringData?)
i use method for updating as in 0:10 but "go version" still showing 19.5. "go1.20 version == go version go1.20" but "go version == go version go1.19.5"
Get your *FREE Golang Cheat Sheet* -
golangdojo.com/cheatsheet
Don't work
@@MrAkarikaDoes not work for me either, but I'm sure we will get the SPAM
Respect man for these awesome videos . Love from India
captions: "a new version of a girl just got released a couple days ago virgin at 1.020 "
😂
I rewound the video like 15 times after seeing this comment! 🤣😂🤣
Based and Gopherpilled
one feature we always take for granted but which is one of Go's best features is the promise of backwards compatibility. It was worth being mentioned, I think
Thanks! Already updating my projects!
You are incorrect about the changes to comparable. It is not the case that "any" is interchangable with "comparable", the change is that generic code with a "comparable" type parameter now can now accept an interface type (such as "any") as type argument. This means that in a generic function, a type parameter that is restricted by "comparable" is still needed to use the "=="/"!=" operators (or to use the type as the key in a map), but when instantiating the generic code you can now pass an interface type, as an interface type is normally comparable (with runtime caveats).
eg:
func equal1[T any](x,y T) bool { return x == y } // INVALID (T is not a comparable type)
func equal2[T comparable](x, y T) bool { return x == y } // VALID (and unchanged from 1.18)
// The main difference is in what is allowed at instantiation
var a,b any = 1,2
var c,d any = []int{}, []int{}
equal1(a,b) // Always an error (since equal1 can't be compiled)
equal2(a,b) // Now OK in 1.20 (fails to compile in go
I thoroughly enjoyed this splendid video
You're the best!
Great resume as always! A video about unsafe package would be highly appreciated. Also in 2:37 you talk about 3 new functions, but unsafe.SliceData is duplicated (was it meant to be StringData?)
Yes we want that video about unconventional unsafe package!
please make a video about the unsafe package
I'd like to know more about unsafe!
nice video please make a video of package unsafe
I thought it's Fireship video
Thanks!!
Awesome video.
Please do an unsafe video
Love these updates, but I feel motion sickness trying to read with that background moving around...
You’re forgetting arena tho it’s experimental you should do some videos about that to
i use method for updating as in 0:10 but "go version" still showing 19.5.
"go1.20 version == go version go1.20" but "go version == go version go1.19.5"
First! Ёпта!
😊
Can u restart the beginer go lang project playslist it has only one vedio in it
Uh Oh you didn’t even touch on PGO? 😢
how many years did it take for golang version 2?
2.0 would be incompatible with 1.X
They would keep version 1.X as long as they could.
Bro, why no yoooo again
That's why i drop golang lol, NET 7 BABY
know this voice lol
second, lol