[erlang-questions] How to get the line number of currentexecutable code?
Kevin Scaldeferri
kevin@REDACTED
Tue Aug 19 20:50:12 CEST 2008
On Aug 19, 2008, at 11:30 AM, David Mercer wrote:
> Richard A. O'Keefe wrote:
>>
>> I have also dreamed of a
>> -pure([f/n,...]).
>> directive, such as NU Prolog had.
>> This would make a verifiable claim that the function(s) named would
>> only call functions that are themselves pure, and a promise that if
>> any exception would be raised in a call to such a function it would
>> not matter which exception.
>
> For those of us not well-versed in NU Prolog, what is the benefit of
> this?
> Please advise. Thank-you.
The compiler can perform optimizations which might otherwise not be
possible. For example, various sorts of loop fusion optimizations are
provably safe for pure functions.
-kevin
More information about the erlang-questions
mailing list