Nice TWiki > Dev > BlockCallSyntax (r1.14 vs. r1.15) TWiki webs:
Dev | Doc | Main | TWiki | Sandbox
Dev . { Changes | Index | Search | Go }
 <<O>>  Difference Topic BlockCallSyntax (r1.15 - 24 Feb 2004 - BrianSmith)
Added:
>
>

Yes, you can do that even now. IMO, this is a problem with the type of println. It should not accept functional values. I just sent a message to the nice-info mailing list about this.

Currently, you can write:

    let a = () => "hello";
    // these print "#<procedure gnu.expr.ModuleMethod>"
    println(a);
    println( () => "hello" );
    // these both print "hello"
    println(a());
    println( (() => "hello")() );

With the second kind of block call syntax, you could write:

    let a = { "hello" };
    // these print "#<procedure gnu.expr.ModuleMethod>"
    println(a);
    println( { "hello" } );
    // these both print "hello"
    println(a());
    println( { "hello" }() );

My proposal is that the type system should not allow the calls that print "#<procedure gnu.expr.ModuleMethod."

-- BrianSmith - 24 Feb 2004


Topic BlockCallSyntax . { View | Diffs | r1.16 | > | r1.15 | > | r1.14 | More }
Revision r1.14 - 23 Feb 2004 - 20:21 GMT - IsaacGouy
Revision r1.15 - 24 Feb 2004 - 01:01 GMT - BrianSmith
Copyright © 1999-2003 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback.