Re:The Awk Programming Language, Second Edition
by snitty on Thursday June 29, 2023 @07:21AM
(#36518958)
DSL == Domain Specific Language?
Re:The Awk Programming Language, Second Edition
by Rediscover on Thursday June 29, 2023 @07:33AM
(#36519048)
Yes
Re:The Awk Programming Language, Second Edition
by coliveira on Thursday June 29, 2023 @08:47AM
(#36519661)
One simple thing I do with awk is to create a command processor: read one line at a time and do things on my data as a response. This is very useful because you can make your command as powerful as needed and call other unix tools as a result.
I see awk as a DSL to be honest. Yes, it can be used as a general purpose language, but that quickly becomes, as you say, awkward :D
Like many DSLs, it is simple, fast and lightweight as long as it is used for it's intended purpose. Once you start using it for something else, these advantages evaporate pretty quickly, because then you have to essentially work around the DSL design to get it to do what you want.