4 ms·
This way of doing things (which I agree is often the correct way) is the reason for Greenspun's Tenth Rule: https://en.wikipedia.org/wiki/Greenspun%27s_tenth_r
by amalcon 3y ago
This way of doing things (which I agree is often the correct way) is the reason for Greenspun's Tenth Rule: https://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule https://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule
Though it's less true today and in languages that are not C or Fortran. Even something like C++ or Java has the template method pattern, which gets you 80% of the way there. Dynamic languages like Python or Ruby tend to have pretty reasonable facilities for building DSLs, as do more modern languages like Scala and Rust.