[erlang-questions] Why isn't erlang strongly typed?

Dan Gudmundsson dgud@REDACTED
Wed Oct 22 09:09:37 CEST 2008

There is a reason there is no mnesia:read/2 and it is that the third argument
is the lock type which forces you to think what kind of lock you want on that object,
there is no need for that on the dirty_* functions.

It's no big deal to add it, but how many will use that instead of 
mnesia:read(Tab,Key,write) without thinking.

PS: I still think that EEP's should be used for language or major library re-writes and
     not minor backward compatible changes. I don't want people to spend time on    	
     meaningless meatings discussing if mnesia api should have a read/2 or read/3 or both.

Richard O'Keefe wrote:
> On 22 Oct 2008, at 4:47 am, <attila.rajmund.nohl@REDACTED>
>> It's not only about the documentation - it's about the documented
>> functions itself too. My favourite example from mnesia - there's a two
>> parameters dirty_read function:
>> dirty_read(Tab, Key) -> ValueList | exit({aborted, Reason}
>> but there's no two parameters read function. Annoys the heck out of me
>> when I replace a dirty_read with a read and get a runtime error.
> As I understand it, we have
> 	dirty_read({Tab,Key}) -> dirty_read(Tab, Key)
> and
> 	read({Tab,Key}) -> ...
> so it should be possible to add
> 	read(Tab, Key) -> read({Tab,Key})
> I've just sent off an EEP for this.  Maybe that was the wrong
> thing to do.  I'm sure someone @ericsson.com could have asked
> somebody to add this.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions

More information about the erlang-questions mailing list