[erlang-questions] Compiler to warn on used underscore-variables
mog
mog-lists@REDACTED
Wed Jan 6 20:32:22 CET 2010
On Wed, Jan 06, 2010 at 02:23:08PM +0100, Tony Rogvall wrote:
> >
> > I'm simply proposing that if the compiler sees code like:
> >
> > measure_secs(Fun) ->
> > {_M, S1, _U} = erlang:now(),
> > Fun(),
> > {_M, S2, _U} = erlang:now(),
> > S2 - S1.
> >
> > to output something like: "Warning: variable '_U' is not unused".
> >
> > Zoltan.
> >
> >
> +1
++
cant tell you how many times i have bit this one as well.
--
Matthew O'Gorman
xim: mog@REDACTED
email: mog@REDACTED
site: http://blog.rldn.net
+---------------------------------------------------------------+
One meets his destiny often on the road he takes to avoid it.
+---------------------------------------------------------------+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 835 bytes
Desc: Digital signature
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20100106/cf7457a4/attachment.bin>
More information about the erlang-questions
mailing list