[nem-bug] [Nemerle 0000850]: Allow to omit anonymous method
signature (as in C#)
feedback at nemerle.org
feedback at nemerle.org
Mon Feb 5 23:21:31 CET 2007
A NOTE has been added to this issue.
======================================================================
<http://nemerle.org/bugs/view.php?id=850>
======================================================================
Reported By: nikov
Assigned To: nazgul
======================================================================
Project: Nemerle
Issue ID: 850
Category: Language Feature
Reproducibility: always
Severity: feature
Priority: normal
Status: confirmed
======================================================================
Date Submitted: 01-28-2007 18:09 CET
Last Modified: 02-05-2007 23:21 CET
======================================================================
Summary: Allow to omit anonymous method signature (as in C#)
Description:
Allow to omit anonymous method signature if there are no ref/out
parameters, and no parameter is used in method body (as in C#).
Foo += fun { Console.WriteLine("here") }
instead of
Foo += fun(_, _) { Console.WriteLine("here") }
See http://comments.gmane.org/gmane.comp.lang.nemerle.devel/2496
======================================================================
----------------------------------------------------------------------
nazgul - 02-04-07 11:42
----------------------------------------------------------------------
Fixed on trunk (r7375)
----------------------------------------------------------------------
nikov - 02-05-07 16:40
----------------------------------------------------------------------
Signature inference works wrong.
module A
{
event E : System.EventHandler;
Foo() : void
{
E += fun(_, _) {}; // OK
E += fun {} // Wrong
}
}
----------------------------------------------------------------------
nazgul - 02-05-07 17:17
----------------------------------------------------------------------
fun { } is just a shortcut for fun () { } so it won't work
----------------------------------------------------------------------
nikov - 02-05-07 17:22
----------------------------------------------------------------------
Intially my request was to infer signature from usage (not simply
substitute empty singature).
It works in C#, and surely it should work in Nemerle, which have much more
powerful type inference capabilities.
So, this request should be reopened.
----------------------------------------------------------------------
VladD2 - 02-05-07 22:49
----------------------------------------------------------------------
I agree with nikov. fun { ... } must infer parametrs coint and type from
call site. It's behavior usefull for event handling.
----------------------------------------------------------------------
nazgul - 02-05-07 22:50
----------------------------------------------------------------------
Ok.. but this one is not going to be easy to do
----------------------------------------------------------------------
VladD2 - 02-05-07 23:21
----------------------------------------------------------------------
+1
I would postpone it up to following release.
Issue History
Date Modified Username Field Change
======================================================================
01-28-07 18:09 nikov New Issue
02-04-07 11:42 nazgul Status new => resolved
02-04-07 11:42 nazgul Resolution open => fixed
02-04-07 11:42 nazgul Assigned To => nazgul
02-04-07 11:42 nazgul Note Added: 0001672
02-04-07 11:42 nazgul Description Updated
02-05-07 16:40 nikov Status resolved => feedback
02-05-07 16:40 nikov Resolution fixed => reopened
02-05-07 16:40 nikov Note Added: 0001683
02-05-07 16:40 nikov Description Updated
02-05-07 17:17 nazgul Note Added: 0001684
02-05-07 17:22 nikov Note Added: 0001686
02-05-07 22:49 VladD2 Note Added: 0001696
02-05-07 22:50 nazgul Note Added: 0001697
02-05-07 22:50 nazgul Status feedback => confirmed
02-05-07 22:50 nazgul Description Updated
02-05-07 23:21 VladD2 Note Added: 0001699
======================================================================
More information about the bugs
mailing list