📜 ⬆️ ⬇️

Solidity 0.5.0 - what's new for us

Update: 11/13/2018 release was released , here is a detailed description of the changes. The article tells about the status of this version in May (five months before the release).


I want to talk about the changes in the Solidity language, which are expected in version 0.5.0. Immediately, I note that I will confine myself only to the language — its grammar and semantics.


There is no imputed text on this topic even in English, but recently a project appeared in the Solidity repository.
On it you can track the progress of preparation of version 0.5.0.


Disclaimer: the article describes the current state of the project, a lot can be changed for release. Exact information can be obtained from the official changelog'a .


Final ban on obsolete designs


Solidity has accumulated quite a lot of outdated constructions that I would like to remove from the language, but this still cannot be done due to backward compatibility. This category changes:



Stricter syntax


In Solidity, very different constructs have a similar syntax. This makes it difficult to read the code, but it even more spoils the life of developers of tools for working with source codes (this applies to the compiler as well). It's nice to see that work is being done in this direction too.



Visibility Modifiers and ABI


With visibility modifiers was an easy mess, largely due to the presence of default values. There are a lot of minor edits that should make the language more stringent, removing this confusion.
And since these modifiers fall into the ABI contract, the changes affected him too.



Functions with an arbitrary number of arguments and data packing


In Solidity, there are several functions that take any number of arguments, glue them together into one binary sausage and continue to work with it. In this process, many subtleties and unobvious moments, and now decided to deal with them.



Improving the "work with memory"


In quotes, because it basically is about "unexpected" access to storage without using assembly.



Out of doubtful


In any barrel of honey will have its own fly in the ointment.



Not about the language


There are several very important changes that do not directly affect the language, but they will greatly affect the code of new contracts.



Any conclusions


Although the release date is still unknown, many innovations can already be touched.
They are enabled using
pragma experimental "v0.5.0";
and
pragma experimental "ABIEncoderV2";
The compiler, of course, gives a warning.


Overall, 0.5.0 is perceived positively. They will remove something that cannot be eliminated due to backward compatibility, they will tightly fix a couple of slippery topics and make several useful changes. Then we'll wait for refactoring of inheritance , and there, maybe, Vyper will arrive in time.


')

Source: https://habr.com/ru/post/353306/


All Articles