Category: Docker

Being a developer, it is easy to jump on the hype train and learn or even use in pet projects the latest libraries, frameworks, and why not programming languages.

In my case, in Apiumhub, we like to read and practice different programming languages, and the more, the better because they bring different visions of how to solve problems and even give you more tools for your day-to-day.

In one of the lunch and learn that we do in Apiumhub, a colleague gave me an idea to migrate an internal client that we have in pure bash to some other language, and as candidates were Go and Rust, as between us we did not agree, we decided that each would choose a language and make its port.The result was that that client never migrated, but along the way, both of us were able to discover the advantages and disadvantages of languages like GO and Rust.From that moment on, I was hooked on Rust and desperate since then, any personal project or proof of concept or idea that I can think of, I try to go first with Rust.

To solve it is as simple as indicating that what we want is to lend the owner so that when the function ends, get the owner again, and that is indicated with and The lifetime is a check of the management of ownership and borrowing of the values, most of the times the compiler knows how to interpret it, but sometimes it is necessary to detail it.

In the Point implementation, the add method receives as parameter self; this is because that method is of instance, if we don’t want to do it, it is as simple as removing the self.

Related Articles