Added more words for Denomination parser#593
Added more words for Denomination parser#593keblek wants to merge 1 commit intorust-bitcoin:masterfrom
Conversation
I noticed that this is more flexible to parse user input with, when I was making a small CLI with.
|
concept NACK. This sort of almost-natural-language processing does not belong in this library. |
|
Fair enough, @apoelstra if I trimmed it down to fewer words would it be more appropriate? Maybe a good compromise would be;
This way a user of the library can tokenise an input string, make it lowercase and have the library parse it with ease. |
|
Sorry, not a big fan either, I was quite surprised to see we support anything apart from BTC and sats at all 😄 Looking at the string parsing code with denomination I'm quite unsure how useful it actually is. Who uses this? The only impl I know that works with units in the API is c-lightning. But that uses msat (that can't be represented by our amount type unless it's only whole sats) and also has no space between number and denomination, so our parsing code would fail anyway afaik. |
|
Well I was trying to use it. I guess I didn't really know how this library was supposed to be used. Seeing all the matching arms I figured that it was meant for parsing. If that's not the case I would prefer just closing this as it is so unimportant and minor that I would prefer that it not take up more time. |
I noticed that this is more flexible to parse user input with, when I was making a small CLI with.