# Introduction Current blockchain protocols such as the Bitcoin and Ethereum blockchains use C++ and Go to implement their features. These languages at the end of the day are stateful languages and I believe that there is a lot to gain by building blockchains with functional languages such as [OCaml](https://ocaml.org/), [Erlang](http://www.erlang.org/) and [Haskell](https://www.haskell.org/). http://i.imgur.com/VP3wkBn.png *Functional programming is built on principles of lamda calculus* # Benefits of Functional Programming Languages ## Immutability Blockchain technology is built around the concept of immutability, the fact that you can't change a transaction, but most blockchain implementations are built using stateful languages. This can lead to a multitude of possible vulnerabilities and unintended side effects. Thankfully functional languages do not have mutable variables and once you set a value it cannot be changed. ## Fault tolerance Fault tolerance is the ability for a system to continue running even in the event of a failure. Erlang was used in the 1980s to handle millions of telephone call switches to ensure maximum availability, in a highly distributed large scale scenario Erlang ensured the Ericsson telecommunications company had 99.99% uptime per year. Languages such as C++ and Go do not provide fault tolerance which seems like a no-brainer for a blockchain implementation. ## Easily parallelized, highly distributed Functional programming enables one to create highly parallelized and distributed systems, partly because the aspect of immutability leads to a number of compiler optimizations. Coupled with built-in functions for iteration such as map and reduce there seems to be very little reasons to use C++ or any other stateful language for blockchain development. # Market validation [Tezos](https://tezos.com/) which is having their upcoming ICO, built their blockchain from the ground up and heavily use OCaml which is a popular functional language. The whole idea behind Tezos is a self-governing blockchain. You can learn more about their project and view the countdown to their ICO at their official site [here](https://tezos.com/). You can view their project's [GitHub source code here](https://github.com/tezos/tezos). # Conclusion I strongly believe that the future of blockchain development should be in functional programming. I hope you enjoyed this post. *Cheers* *~Np*
author | nphacker |
---|---|
permlink | why-functional-languages-should-be-used-for-blockchain-development |
category | functional |
json_metadata | {"tags":["functional","blockchain","tezos"],"image":["http://i.imgur.com/VP3wkBn.png"],"links":["https://ocaml.org/","http://www.erlang.org/","https://www.haskell.org/","https://tezos.com/","https://github.com/tezos/tezos"],"app":"steemit/0.1","format":"markdown"} |
created | 2017-05-13 18:59:27 |
last_update | 2017-05-13 21:38:12 |
depth | 0 |
children | 2 |
last_payout | 2017-05-20 18:59:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 8.506 HBD |
curator_payout_value | 2.735 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 2,429 |
author_reputation | 9,918,008,820,689 |
root_title | "Why Functional Languages Should Be Used for Blockchain Development" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 3,385,865 |
net_rshares | 4,367,557,920,439 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
pharesim | 0 | 361,272,377,236 | 4% | ||
samupaha | 0 | 873,297,633,213 | 100% | ||
ihashfury | 0 | 6,738,605,492 | 27.6% | ||
boy | 0 | 2,581,802,789 | 100% | ||
bue-witness | 0 | 3,148,072,497 | 100% | ||
bunny | 0 | 463,108,923 | 100% | ||
bue | 0 | 51,587,080,630 | 100% | ||
mini | 0 | 1,379,930,738 | 100% | ||
moon | 0 | 175,448,853 | 100% | ||
healthcare | 0 | 514,258,184 | 100% | ||
daniel.pan | 0 | 813,568,504 | 100% | ||
team | 0 | 164,777,693,177 | 100% | ||
helen.tan | 0 | 235,195,542 | 100% | ||
ivan-perez-anies | 0 | 12,519,597,514 | 40% | ||
carlos-cabeza | 0 | 561,035,518 | 40% | ||
nphacker | 0 | 31,028,240,618 | 100% | ||
juanmiguelsalas | 0 | 4,738,652,018 | 40% | ||
kenny-crane | 0 | 86,015,950,001 | 100% | ||
heiditravels | 0 | 215,288,525,273 | 40% | ||
good-karma | 0 | 105,373,584,463 | 23% | ||
luisucv34 | 0 | 2,207,334,919 | 40% | ||
gkucmierz | 0 | 636,256,330 | 100% | ||
fiveboringgames | 0 | 2,976,214,394 | 6.9% | ||
social | 0 | 0 | 0% | ||
mysteem | 0 | 353,441,044 | 23% | ||
yoganarchista | 0 | 8,197,468,852 | 100% | ||
rznag | 0 | 34,500,049,426 | 100% | ||
shaka | 0 | 782,772,937,105 | 100% | ||
craigslist | 0 | 347,971,558 | 100% | ||
twinner | 0 | 723,980,093,808 | 50% | ||
gargon | 0 | 86,936,073,543 | 40% | ||
pgarcgo | 0 | 81,331,881,518 | 40% | ||
wartrapa | 0 | 18,063,119,935 | 40% | ||
lordvader | 0 | 123,484,677,912 | 100% | ||
moisesmcardona | 0 | 4,284,141,869 | 40% | ||
demo | 0 | 128,075,130 | 23% | ||
albagargon | 0 | 435,902,499 | 40% | ||
pollux.one | 0 | 95,152,007,220 | 100% | ||
titin | 0 | 24,992,981,497 | 40% | ||
feruz | 0 | 182,906,453 | 23% | ||
jgcastrillo19 | 0 | 32,846,474,805 | 40% | ||
nelyp | 0 | 6,045,433,111 | 40% | ||
juliamateo | 0 | 1,181,351,465 | 40% | ||
bestofreddit | 0 | 392,046,706 | 6.21% | ||
teo | 0 | 1,624,394,834 | 40% | ||
alfredozofio | 0 | 1,678,477,397 | 40% | ||
beers | 0 | 42,133,114,956 | 50% | ||
dulcinea | 0 | 2,283,889,215 | 40% | ||
mdcomes | 0 | 2,363,947,853 | 40% | ||
jonathanxvi | 0 | 1,545,252,741 | 100% | ||
esteemapp | 0 | 131,944,768 | 23% | ||
reisman | 0 | 997,545,741 | 23% | ||
irawandedy | 0 | 800,463,364 | 23% | ||
bellastella | 0 | 5,032,290,779 | 100% | ||
aniestudio | 0 | 7,107,815,515 | 40% | ||
tamim | 0 | 295,365,111,840 | 29% | ||
loreennaa | 0 | 1,996,956,567 | 40% | ||
bounties | 0 | 243,972,541 | 23% | ||
steempoll | 0 | 184,014,663 | 23% | ||
derbi | 0 | 229,927,447 | 11.5% | ||
ogochukwu | 0 | 1,609,974,376 | 23% | ||
dorodor | 0 | 104,355,480 | 11.5% | ||
teacher | 0 | 138,786,839 | 40% | ||
evildeathcore | 0 | 401,312,691 | 23% | ||
bhikkhu | 0 | 15,252,636,531 | 100% | ||
tincho | 0 | 1,049,797,070 | 40% | ||
businesswri | 0 | 5,549,869,914 | 100% | ||
motivator | 0 | 264,294,220 | 23% | ||
artguy | 0 | 158,747,565 | 23% | ||
jocra | 0 | 20,667,905,596 | 100% | ||
tipping | 0 | 286,435,912 | 23% | ||
sancho.panza | 0 | 564,531,148 | 40% | ||
jdc | 0 | 1,145,624,426 | 100% | ||
blackmanta | 0 | 1,193,357,538 | 100% | ||
entice | 0 | 318,620,943 | 30% | ||
deepti | 0 | 1,193,347,687 | 100% | ||
heejin | 0 | 0 | 100% | ||
yaalu | 0 | 0 | 100% | ||
marnee | 0 | 0 | 100% | ||
lisperati | 0 | 0 | 100% | ||
aetrnty | 0 | 0 | 100% | ||
haudegen | 0 | 0 | 100% | ||
asiadream | 0 | 0 | 100% |
I would take it a step further, the future of programming should be functional programming :) You can see its influence already. C++ 11, Java 8 and C# 3.5 was when these languages started to pull in lambda. C# is pushing more functional features with each release.
author | woz.software |
---|---|
permlink | re-nphacker-why-functional-languages-should-be-used-for-blockchain-development-20170710t063608723z |
category | functional |
json_metadata | {"tags":["functional"],"app":"steemit/0.1"} |
created | 2017-07-10 06:36:09 |
last_update | 2017-07-10 06:36:09 |
depth | 1 |
children | 0 |
last_payout | 2017-07-17 06:36:09 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 265 |
author_reputation | 2,321,910,395,519 |
root_title | "Why Functional Languages Should Be Used for Blockchain Development" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 7,954,561 |
net_rshares | 0 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
marnee | 0 | 0 | 100% | ||
luc-lucens | 0 | 0 | 100% |
I agree. What do you think of Clojure? and status.im using ClojureScript? This http://blog.syrinx.net/the-resurrection-of-lll-part-1/ talks about a LISP like language called lll for writing smart contracts.
author | yaalu |
---|---|
permlink | re-nphacker-why-functional-languages-should-be-used-for-blockchain-development-20170625t164130074z |
category | functional |
json_metadata | {"tags":["functional"],"links":["http://blog.syrinx.net/the-resurrection-of-lll-part-1/"],"app":"steemit/0.1"} |
created | 2017-06-25 16:41:15 |
last_update | 2017-06-25 16:41:15 |
depth | 1 |
children | 0 |
last_payout | 2017-07-02 16:41:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 208 |
author_reputation | 0 |
root_title | "Why Functional Languages Should Be Used for Blockchain Development" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 6,064,006 |
net_rshares | 0 |