4 ms·
No IMO this is correct. DSLs often lead to heterogeneous code styles that are hard to reason about. Simpler is usually better.
by MrBuddyCasino 2y ago
No IMO this is correct. DSLs often lead to heterogeneous code styles that are hard to reason about. Simpler is usually better.
- d0mine 2y agobash -- DSL for invoking subprocesses :: what you rather see in a code review: one-line shell pipeline or equivalent Python code? https://stackoverflow.com/questions/295459/how-do-i-use-subprocess-popen-to-connect-multiple-processes-by-pipes https://stackoverflow.com/questions/295459/how-do-i-use-subp... sh-like DSL on top of Python literal strings that doesn't invoke shell might be interesting (pep may help) regex -- DSL for search/replace in text. Useful in moderation jq -- DSL for search/replace in json. Useful on the command-line xpath -- DSL for searching trees (hierarchy) sql/xslt -- I would rather read Python most of the time instead but sometimes it is helpful to have an option of writing SQL directly (pep may help) toml/json -- writing Python directly is preferable (in the context of .py file) markdown -- DSL for writing markup (instead of html/word). I wouldn't say no to inline docstring rendering in Python code (pep may help). The same for (subset of) latex -- for math formulas `$e^{i \pi} -1 = 0$` dot/plantuml (ebnf, sequence diagrams, etc) could be useful for literate programming-heavy style.