<div dir="ltr">could we have something in type specifications that indicates throw case:<br><br>-spec f_name( Args ) -> .....; throw(TE | TE1 | ....).</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 27, 2017 at 11:25 AM, Attila Rajmund Nohl <span dir="ltr"><<a href="mailto:attila.r.nohl@gmail.com" target="_blank">attila.r.nohl@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2017-09-27 11:08 GMT+02:00 Joe Armstrong <<a href="mailto:erlang@gmail.com">erlang@gmail.com</a>>:<br>
[...]<br>
<span class="">> This turns out to be very convenient - I read many files<br>
> in my programs, so it's nice to know that must_read_file<br>
> will print a nice error message and terminate<br>
> if I give it a bad filename.<br>
><br>
> Note: I can get the program to crash by writing<br>
><br>
> {ok, B} = file:read_file(F)<br>
><br>
> But I don't get a nice error message telling me the filename.<br>
><br>
> Any takers?<br>
<br>
</span>My problem with all kinds of very common prefixes is that it breaks<br>
function name autocompletion. Or at least makes it harder to use when<br>
I have dozens/hundreds/thousands of function names starting with the<br>
same 3-5 characters - either I have to type those 3-5 characters all<br>
the time plus any more characters to find unique prefix for<br>
autocompletion or have to autocomplete twice (one for the may/must<br>
difference, one for the actual function name). Eclipse (for Java)<br>
helpfully shows the method signature including return value and thrown<br>
exceptions - I think this problem should be solved by the IDEs and not<br>
by naming conventions.<br>
<div class="HOEnZb"><div class="h5">______________________________<wbr>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/<wbr>listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br></div>