| ▲ | MarkSweep 4 hours ago | |
There is a middle ground between using XML and imperative code for representing tax forms. Robert Sesek’s ustaxlib [0] uses JavaScript to encode the forms in a way that is reasonably statically analyzable. See the visualizer [1]. My approach uses XML to represent the forms with an embedded DSL to represent most expressions tersely. See for example Form 8960 in ustaxlib [2] and my TaxStuff program [3]. The main thing that the XML format from the article has going for it is that it is easy to write a parser for. But it is a bit verbose for my taste. [0]: https://github.com/rsesek/ustaxlib [1]: https://github.com/rsesek/ustaxviewer [2]: https://github.com/rsesek/ustaxlib/blob/master/src/fed2019/F... [3]: https://github.com/AustinWise/TaxStuff/blob/master/TaxStuff/... | ||
| ▲ | alexpetros 4 hours ago | parent | next [-] | |
For what it's worth, I think that an embedded DSL to represent most expressions tersely is a worthwhile idea to explore—it's just a more expensive one. That's a cost-effective choice at a some levels of resourcing, but not every level of resourcing. | ||
| ▲ | jauntywundrkind 4 hours ago | parent | prev [-] | |
Also, the IRS open source Direct File and their Fact Graph too. https://news.ycombinator.com/item?id=45599567 https://news.ycombinator.com/item?id=44131901 https://github.com/IRS-Public/direct-file/blob/main/direct-f... The graph is xml. | ||