Programming
How one language or tool really behaves: the mechanism, a snippet that runs, and where it breaks.
GoByte Skills: 9 tracks. One mechanism, one snippet, one animation.
See the seriesLatest in Programming
RSS-
Java from zero: a record keeps the cents
A record is a small object with fields the constructor sets. Money holds cents. Adding three lattes of 450 prints 1350.
-
Go from zero: an interface is a method list
An interface names the methods a function needs. Labeller asks for Label, Item has Label, and show prints latte $4.50.
-
Go from zero: a method can change the struct
A method with a pointer receiver changes the struct the caller holds. AddTip adds 20 percent to a $4.50 bill, and the program prints $5.40.