Julia is so easy to code from first principles (the real formula-translation deal) that I never venture out of for loops. Every year JuliaCon yanks me out of my dreary yet comfortable existence and shows me all those half-line trickery. I hang my head in shame, down a couple of beers and get back to the loops. On it goes.
5 Likes
Nothing wrong with loops. I use 'em all the time.
6 Likes
I’ve come to prefer the simplicity/readability of things like simple loops over one-liner tricks. If I have to figure out some code that I wrote 5 years ago and it’s full of “half-line trickery” I usually end up cursing my former self and wishing that I had written some plain vanilla code.
8 Likes
Loops are so much easier to optimize too IMO
2 Likes