2 ms·
Go's enums aren't even something to talk about when compared with classical Pascal enumerations. Naturally this is much better to type, type Weekdays int
by pjmlp 2y ago
Go's enums aren't even something to talk about when compared with classical Pascal enumerations.
Naturally this is much better to type,
type Weekdays int
const (
Monday Weekdays = iota
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday
)
than something like this,
type Weekdays = (Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday)
/s