:: Re: [Libbitcoin] [PATCH] Implement …
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Amir Taaki
Fecha:  
A: libbitcoin
Asunto: Re: [Libbitcoin] [PATCH] Implement a bitcoin URI parser
yep it's your code, so feel free to merge it.
mostly it looks really good, but there's a lot of C'isms :)
the only suggestion is that the use of visitor is not consistent with
the rest of the API.
Do you have an account on our Wiki?
https://wiki.unsystem.net/index.php/Libbitcoin/Team

On 20/03/14 17:31, William Swanson wrote:
> On Thu, Mar 20, 2014 at 5:18 AM, Amir Taaki <genjix@???> wrote:
>> Also I wouldn't worry too much about performance :) Far better is clarity,
>> simplicity and directness of code. For instance the only place in
>> libbitcoin I'm concerned about performance is the blockchain and maybe the
>> memory overhead for the network stuff. Especially for parsing user data
>> (like a URI) which you won't be doing millions of times a second, it
>> doesn't matter too much. So in this case we might choose to write code
>> that isn't as performant as it could be because it looks pretty.
>
> Oops. Didn't you see this pull request?
>
> https://github.com/spesmilo/libwallet/pull/10
>
> I wrote my own number parser last night, so now we have two versions
> of that same code. Actually, my parser is a bit shorter, is integrated
> directly into the validation code, and has rounding. However, I have
> just taken your invalid_amount constant, since that's a good idea.
>
> Also, if you look at the new way I did the parsing/decoding in that
> pull request, I think you will agree that it is far more elegant than
> it was before. It gets rid of the parse/decode distinction while still
> allowing extensibility, so it may be even simpler than what you had in
> your first patch.
>
> -William
>