golang / tour

[mirror] A Tour of Go
BSD 3-Clause "New" or "Revised" License
1.53k stars 521 forks source link

tour: [The expression T(v) converts the value v to the type T.] #1624

Open mayank5464942 opened 4 days ago

mayank5464942 commented 4 days ago

Context: https://go.dev/tour/basics/13

"The expression T(v) converts the value v to the type T."

The above statement wrongly interprets the expression. should'nt it be meant more as if var a float64 = 5.3; var b int32=int32(a); now here the value of "a" does not change to int32 instead the assigned variable b gets the change in datatype value of a.