On 04/14/2011 07:58 PM, "Jérôme M. Berger" wrote:
spir wrote:
Actually, I have never been pleased that func defs (1) look like func
calls (2) have an exceptional syntax compared to other definitions. I'd
like instead eg:

     square = function (int n) int {
         return n * n;
     }

        That is still different from other definitions where the type comes
first.

True. I was firstly evoking the "x = y" form.

 But the following would work too:

function (int n) int square = {
    return n*n;
}

        And both would be easier to parse to boot:)

Yes, I like your format as well.

 There are actually
languages out there with this kind of syntax.

Yop, I know (my example was Lua-like: we are not reinventing the wheel ;-)

Denis
--
_________________
vita es estrany
spir.wikidot.com

Reply via email to