Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: earlz on July 13, 2017, 07:52:05 PM



Title: If you could use any programming language for smart contracts, what would it be?
Post by: earlz on July 13, 2017, 07:52:05 PM
I'm wanting to gauge what people are thinking about smart contracts. I know a lot of people don't like Solidity, but if you had a magic box that could support any programming language for smart contracts, what language would you choose and why?


Title: Re: If you could use any programming language for smart contracts, what would it be?
Post by: ranih on July 13, 2017, 08:04:47 PM
I'd choose the language I'm most familiar with, and I guess that would be the answer of most people.
In my case it'd be python.

You can try looking at open source projects in the crypto world to estimate which language is the most popular...


Title: Re: If you could use any programming language for smart contracts, what would it be?
Post by: earlz on July 13, 2017, 09:09:07 PM
I'd choose the language I'm most familiar with, and I guess that would be the answer of most people.
In my case it'd be python.

You can try looking at open source projects in the crypto world to estimate which language is the most popular...

Interesting. I figured most people would want a particular language that has more of an emphasis on safety, like Haskell or Rust or something


Title: Re: If you could use any programming language for smart contracts, what would it be?
Post by: ranih on July 13, 2017, 09:41:59 PM
I'd choose the language I'm most familiar with, and I guess that would be the answer of most people.
In my case it'd be python.

You can try looking at open source projects in the crypto world to estimate which language is the most popular...

Interesting. I figured most people would want a particular language that has more of an emphasis on safety, like Haskell or Rust or something

Maybe...
I think minimum friction is stronger. Moreover, safety ia more a matter of your code than the language you choose.


Title: Re: If you could use any programming language for smart contracts, what would it be?
Post by: s1gs3gv on July 13, 2017, 10:27:20 PM
Clojure has a lot to recommend itself but you'd want to avoid JVM based languages for resource contraint reasons.

Haskell  has a lot going for it but you'd want to avoid compiled languages for portability reasons when dealing with heterogenous p2p systems.

Agda, Idris, Coq et all have a lot going for them too but they're too complex for common use.

That doesn't leave many choices.


Title: Re: If you could use any programming language for smart contracts, what would it be?
Post by: s1gs3gv on July 13, 2017, 10:30:26 PM
Moreover, safety ia more a matter of your code than the language you choose.

I couldn't disagree more strongly. Type safety is essential. Going further, in soft contract programming you really want a language that allows proofs of correctness.


Title: Re: If you could use any programming language for smart contracts, what would it be?
Post by: earlz on July 13, 2017, 10:43:59 PM
Clojure has a lot to recommend itself but you'd want to avoid JVM based languages for resource contraint reasons.

Haskell  has a lot going for it but you'd want to avoid compiled languages for portability reasons when dealing with heterogenous p2p systems.

Agda, Idris, Coq et all have a lot going for them too but they're too complex for common use.

That doesn't leave many choices.

Yes, this is what I'm seeing as well. There's no good language really built for this yet


Title: Re: If you could use any programming language for smart contracts, what would it be?
Post by: systemv on July 13, 2017, 11:22:05 PM
In my opinion that should be either pure javascript or better, typescript. Lots of people know it, tremendous amount of tools, IDE's, testing frameworks, etc. Also integrating ability to use frameworks like Angular with ts can finally make dapps useful and beautiful and not that ugly looking geeky ones we have today. Bridging gap of dapps and users...


Title: Re: If you could use any programming language for smart contracts, what would it be?
Post by: earlz on July 14, 2017, 04:00:22 PM
In my opinion that should be either pure javascript or better, typescript. Lots of people know it, tremendous amount of tools, IDE's, testing frameworks, etc. Also integrating ability to use frameworks like Angular with ts can finally make dapps useful and beautiful and not that ugly looking geeky ones we have today. Bridging gap of dapps and users...

I don't know enough about Typescript and it's improvements, but for javascript at least, I wouldn't want to trust millions of dollars to some code written in Javascript. Similar to Solidity there are just too many pitfalls and ways to write code that looks clear and concise but has unexpected behavior. If you want a laugh, watch this "wat" lightning talk (it covers Javascript 1 minute in) to see what I mean https://www.destroyallsoftware.com/talks/wat


Title: Re: If you could use any programming language for smart contracts, what would it be?
Post by: coin_coin on July 14, 2017, 04:09:54 PM
JAVA, the most useful and wide accepted.