3 ms·
> 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 eve
by naasking 9y ago
> 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?
- deleted 9y ago[deleted]
- tinco 9y agoIt was designed to be like Javascript. Of all languages...
- dom96 9y agoWouldn'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...
- quickthrower 9y agoIn Haskell everything is public by default unless you specify exports for the module.
- aisofteng 9y agoBut it also has a statically checked type system.
- quickthrower 9y agoI 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.