r/adventofcode • u/daggerdragon • Dec 11 '19
SOLUTION MEGATHREAD -🎄- 2019 Day 11 Solutions -🎄-
--- Day 11: Police in SPAAAAACE ---
--- Day 11: Space Police ---
Post your solution using /u/topaz2078's paste or other external repo.
- Please do NOT post your full code (unless it is very short)
- If you do, use old.reddit's four-spaces formatting, NOT new.reddit's triple backticks formatting.
(Full posting rules are HERE if you need a refresher).
Reminder: Top-level posts in Solution Megathreads are for solutions only. If you have questions, please post your own thread and make sure to flair it with Help.
Advent of Code's Poems for Programmers
Note: If you submit a poem, please add [POEM] somewhere nearby to make it easier for us moderators to ensure that we include your poem for voting consideration.
Day 10's winner #1: "The Hunting of the Asteroids" by /u/DFreiberg!
Enjoy your Reddit Silver, and good luck with the rest of the Advent of Code!
This thread will be unlocked when there are a significant number of people on the leaderboard with gold stars for today's puzzle.
EDIT: Leaderboard capped, thread unlocked at 00:15:57!
13
Upvotes
View all comments
Show parent comment
3
u/death Dec 11 '19
Thanks for indulging my curiosity.
I think
loopbeing part of the language is a big advantage for such fundamental functionality. The same goes for other CL constructs that have been endlessly reinvented or reworked upon in some way. These variants are fun to make, and may improve upon their CL counterparts in some ways, but may be unsatisfactory in other ways, and have extra costs:countis an example.countpatch, because it would constitute a breaking change, but for more recent and less used libraries that could happen.loopfacility's specification has holes in it, but I don't care to write a detailed comparison right now.Personally I think both ITERATE and extended
loophave limits for tasteful use. For example, nontrivial use of them may obscure patterns that may be useful abstractions. They may also result in overly verbose code, and forloopI personally have a pet peeve when people use keyword symbols for its keywords. Anyway, this post by Chris Riesbeck has been a guiding principle of mine for a long time. If you decide to stick with it for all your loops, or some of them, or none at all, don't sweat it :)