[Vala] anonymous functions



I find this notation ugly:

                notify += (s, p) => {
                        stdout.printf("property `%s' has changed!\n",
                                      p.name);
                };


Is there a reason why the => should be required?

                notify += (s, p) {
                        stdout.printf("property `%s' has changed!\n",
                                      p.name);
                };


seems a lot more natural, all that's missing is the name cos there isn't
one...

Does the => signifiy anything particular?

Sam



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]