Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Unmarked functions default to public in Solidity

Facepalm

Wasn't this lesson learned long ago? C# defaults to private on unmarked members. Why would you ever want to default public?



It was designed to be like Javascript. Of all languages...


Wouldn't it make more sense to design it like Haskell? or something even more strict? A little bit of extra work seems like a small price to pay to prevent millions being stolen from your wallet because of a silly mistake like this...


In Haskell everything is public by default unless you specify exports for the module.


But it also has a statically checked type system.


I think if done in Haskell how good or bad it is depends on the chosen abstraction for effects not Haskell itself.

Haskell is a good basis but the developers need to make the API fool proof. E.g. expose limited effects rather than a big fat "IO" type.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: