I recently discussed the new Viper smart contract programming language with Ethereum's Vitalik Buterin. Viper is similar to Python and provides more features and protections than Serpent. One of many noteworthy examples is support for Decimal like objects which are helpful for financial applications. Furthermore, the Viper compiler is implemented in Python 3. The same people that will want to use Viper can more easily help develop and maintain it. Here is a slightly edited version of the interview:
Serpent is written in C++ and the codebase is hard to work on. Once we start talking about doing major rewrites of Serpent, then we might as well add a bunch of other features to make the language much safer, like bounds checking, strong typing, etc. Hence, the totally-backwards-incompatible "[S]erpent 2.0" upgrade named Viper.
I definitely recommend starting to look at Viper over Serpent. It's not 100% feature-complete yet but I hope it will be in a few months.
Automated porting will be hard; also, note that not all Serpent code should be ported to Viper, as some Serpent code is for low-level highly optimized code, and that is best done in Serpent.
Lack of a strong type system
General ease of writing unsafe and misleading code
Lack of easy accessibility + extensibility of the compiler code
Hopefully in a few months.
Started working on it in Nov. So far I like it :) I am currently using it for writing Casper contracts.
Add support for calling external contracts
A stronger type system that can statically check variable bounds, increasing both efficiency and safety
More tests; always want more tests (ideally with a checker verifying 100% code coverage)
Submit pull requests to http://github.com/ethereum/viper :)
You can contact me by clicking any of these icons:
I would like to thank IOHK (Input Output Hong Kong) for funding this effort.
This work is licensed under the Creative Commons Attribution ShareAlike 4.0 International License.
<3for the original Ethereum vision