xledger / Xledger.Sql

MIT License
1 stars 1 forks source link

Parse and Render helper methods? #7

Open oconnor0 opened 4 hours ago

oconnor0 commented 4 hours ago

Might be nice to include Parse (or TryParse) and Render helper methods for the immutable DOM. The implementation would likely involved conversion to/from the mutable DOM so would probably be "slow".

isaksky commented 3 hours ago

Hmm maybe. But sometimes the absence of such functions can be instructive. In the same way there is no List.nth in F# lists (linked).

I guess that problem can also be solved with the function name though, parseAndConvert or something.

oconnor0 commented 3 hours ago

Agreed. I ran into a place while debugging when Render would have been helpful, but there's a cost there so figured it'd be worth thinking whether there's a right way to do it.