mimblewimble team mailing list archive
-
mimblewimble team
-
Mailing list archive
-
Message #00261
Re: Why using rust as language?
Rust performance is more than acceptable for the tasks it’s being used for in Grin. Nobody is anticipating a need to rewrite it in C.
The crypto library (a fork of secp256k) is implemented in C, as is the code for mining, as are some critical dependencies, and all use Rust C bindings, which are very easy to create as needed.
> On 13 Oct 2017, at 12:59, Alberto Garcia <agarciaillera@xxxxxxxxx> wrote:
>
> "As for the language choice being a ‘barrier,’ if it keeps out the type of "engineer" who can’t/won’t trouble themselves to learn a new language, then I’m happy it's in place"
> Same thing can be said about programmers that don't want to learn how to deal with memory, pointers and safe programming (i.e. C++) ... :)
>
> Speed wise and mostly memory wise Rust is way more inefficient than C/C++.
>
> I'm just curious because if this project, as I hope, keeps growing it will eventually be difficult to port if needed.
>
> Actually, things like the mining process will be implemented in rust instead of C?
>
> Anyway, I'm happy to learn Rust!
>
> On Fri, Oct 13, 2017 at 6:32 PM, Yeastplume <yeastplume@xxxxxxxxx <mailto:yeastplume@xxxxxxxxx>> wrote:
> Hi Alberto,
>
> I didn’t make the original choice, but Rust provides all sorts of safety mechanisms which take a while to learn and adapt to, but once you do, code you write generally behaves exactly how you expected, with little possibility of hard-to-trace pointer/memory allocation/buffer overflow/casting/whathaveyou issues that are a feature of every C/C+ project. It also means a lot less time debugging, testing for odd memory cases, and chasing down the obscure issues that will inevitably occur in the field. Yes you can set up all sorts of conventions in a C project to protect against this, but with Rust, you generally don’t have to.
>
> As for the language choice being a ‘barrier,’ if it keeps out the type of "engineer" who can’t/won’t trouble themselves to learn a new language, then I’m happy it's in place. Sorry for sounding a bit harsh, but I can’t find a way to express that sentiment more delicately.
>
> YP
>
>
>> On 13 Oct 2017, at 11:15, Alberto Garcia <agarciaillera@xxxxxxxxx <mailto:agarciaillera@xxxxxxxxx>> wrote:
>>
>> Hi,
>>
>> I'm very interested in your project since it solves very important problems in current cryptocurrencies out there.
>>
>> I would like to collaborate and help you with the coding but I realized that the language used is Rust and not something more "standard" as C/C++. Was reading about Rust and saw that it's similar than C++ but designed for better memory safety.
>>
>> Just wondering why are you using Rust since I think it creates a barrier for a lot of developers interested in the project but not familiarized with something like Rust.
>>
>> Actually, this article explains very well what I want to say with the language election:
>> https://www.viva64.com/en/b/0324/ <https://www.viva64.com/en/b/0324/>
>>
>> Anyway thank you very much for the time you all put in this project.
>>
>> Cheers
>>
>>
>> --
>> Mailing list: https://launchpad.net/~mimblewimble <https://launchpad.net/~mimblewimble>
>> Post to : mimblewimble@xxxxxxxxxxxxxxxxxxx <mailto:mimblewimble@xxxxxxxxxxxxxxxxxxx>
>> Unsubscribe : https://launchpad.net/~mimblewimble <https://launchpad.net/~mimblewimble>
>> More help : https://help.launchpad.net/ListHelp <https://help.launchpad.net/ListHelp>
>
>
>
>
> --
> Alberto García Illera
>
> GPG Public Key: https://goo.gl/twKUUv <https://goo.gl/twKUUv>
References