The rise of digital dependency within business environments has brought upon the need for safer and more robust technologies for handling digital transactions. In the past half-decade, many technological updates have enabled business processes to be faster, more streamlined, safer, and better understood by stakeholders. The introduction of smart contracts, for example, has gone a long way in revolutionizing how companies enter into business agreements. Businesses now have a clearer way of working together through tools that have been built by emerging contract-oriented programming languages like Solidity.
A fairly new language, Solidity was created to run on the Ethereum Virtual Machine (EVM) and allow users who use the Ethereum digital transaction ledger to generate smart contracts. For the most part, contract-oriented programming languages like Solidity borrow heavily from its predecessor, object-oriented programming (OOP). It has been argued before those languages like Solidity were not required since languages like C# and C++ were able to handle smart contraction. However, with COP languages, there are additional functionalities which optimize these contracts to a higher level.
Introduction of interface specifications such as preconditions, post-conditions, and invariants within smart contract languages make the process easier and more understandable for the users and the developers. In fact, it is these interface specifications that are referred to as the “contracts” of contract-oriented programming as they form the basis for smart contract generation.
Ethereum also wanted a language that would run on its already created EVM rather than have to generate compilers for already existing languages, so Solidity was generated. Like any other programming language, Solidity came with its advantages and disadvantages.
THE ADVANTAGES
Inheritance Support
One advantage which Solidity borrows from OOP languages is the support for inheritance properties within its constructs. Through inheritance, developers can create abstract classes with shared definitions and find out how to implement them differently from within the classes. Through inheritance, there is support for hierarchical mapping. An added advantage of inheritance is the ability to utilize member variables within objects and classes. Pre-defined variables can be applied to various functions to come up with the desired result, which reduces a load of code within the contracts.
Application Binary Interface (ABI)
ABI is an interface which facilitates interactions between two binary programs or applications. It determines factors such as the binary formats through which information is passed between the applications, as well as the functions which will be called to perform the tasks of passing this data. ABIs allow its users to determine whether or not the data returned from a function is the right one and of the right type. This is essential for smart contractions as it facilitates type-safe functions within a contract and ensures the right datatype is returned as validated by the compiler.
THE DISADVANTAGES
New Language
The biggest disadvantage which can be seen from Solidity is that which all programming languages have faced at some point – it is a young language. For developers, this means that there may be very few libraries and reference materials which may also not contain as much information concerning its structures and various components. This will make learning the language a difficult task for those who will embark on learning it.
Another disadvantage that can be seen from the language being young is the possibility of anti-patterns within the code structures. Anti-patterns are practices which are generally discouraged in programming practices. Usually, they are code patterns which make code less readable or those which slow down an application during its use. The lack of documentation on best practices when it comes to using Solidity may result in anti-patterns which may be unrecognizable until later in the future.
Transactional Operation
Because Ethereum runs on Blockchain technology, it is impossible to acquire data into the systems except through transactional operations. This can be a major problem when it comes to factors such as volatile data. Stock exchange prices and the prices of valuables such as gold are usually changing every now and then. The demand for regular goods and services also changes seasonally and this has an impact on their prices. Ethereum, through Solidity, cannot acquire and update this information on the fly. It will have to depend on transactions to be updating such trivial changes in various forms of data.
Limited expressiveness
A derivative of the first problem mentioned, Solidity has the task of convincing developers and users into shifting to its libraries from already established programming languages such as JavaScript and Python. The language has a limited scope of expressiveness and developer capabilities thanks to its library which is only just growing, so it may be difficult for developers to undertake and explore some of the ideas they may have by using the language.
Ethereum is an already established technology which has managed to stay at par with most of its competitors. While innovations such as the EVM and Solidity give it an upper hand in terms of use, it may be difficult to bring everyone else on board with the idea for now. Perhaps developers may show greater interests when the language will have grown a lot more than it is now.