Not who you asked, but for me (I use a custom language for work) it was a matter of being able to do what I wanted, in the way I wanted. The other added benefits were I could ensure that code I wrote for clients and for my employer met the ethical and professional obligations that I incur as an attorney. The only downside (according to others) is that my language implementation belongs to my employer, the theoretical foundation and language definition are owned by me. Overall, I feel more productive and I feel like the value I deliver is greater than it would be in another language.
Jokes aside, that’s a really interesting use case. I’ve often wondered how laws, and changes to them over time, are recorded. It seems like the kind of thing that could be made more efficient with a formal syntax along with version control.
I now regret that I didn’t have that thought myself. As to the encoding of laws formally, I know there are some existing attempts to achieve that, but that type of thing doesn’t really apply in my line of work. I do however have a database version of the statutes that keeps the textual history and is searchable implemented.