skip to content
Alvin Lucillo

New for..range and L'imparfait

/ 1 min read

💻 Tech

With Go 1.22, you can now simplify the iteration from 0 to a number using the new for..range syntax. Here’s an example:

for i := range 5 {
    fmt.Println(i)
}

Earlier, you couldn’t do that and had to use the for loop with a condition like this:

for i := 0; i < 5; i++ {
    fmt.Println(i)
}

Although the change is small, it makes the code more readable and less error-prone.

🌍 Language

A phrase I learned in French today:

“Quand j’etait petit, c’etait simple.” which means “When I was little, it was simple.”

The tense of the verb is called “L’imparfait” in French or “The Imperfect Tense” in English. It’s used to describe ongoing or repeated actions in the past.