Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 3dd07af3f56d22e70e0f0aeb7f3a5b7551f6e53a
Ticket: 1574835fffffffffffffffffffffffffffffffff
wrong#args problem in [apply] guts
User & Date: msofer on 2006-10-11 05:34:02
Changes

  1. icomment:
    Logged In: YES 
    user_id=148712
    
    Oohh ... nasty, the error messages for curried lambdas are
    not quite ok.
    
    % set lam [list {self x} {return "[expr {$x*$x}] - $self"}]
    {self x} {return "[expr {$x*$x}] - $self"}
    % apply $lam bar
    wrong # args: should be "apply {{self x} {return "[expr
    {$x*$x}] - $self"}} self x"
    % interp alias {} try {} apply $lam bar
    try
    % try
    wrong # args: should be "apply {{self x} {return "[expr
    {$x*$x}] - $self"}} self x"
    
    That should be instead:
    wrong # args: should be "try x"
    
    Or should it?
    % interp alias {} try2 {} boo bar
    try2
    % try2
    wrong # args: should be "boo self x"
    [Side note: should interp alias rewrite the error message
    ust like ensemble aliases? Probably ...]
    
    
    There is here (I think) some interplay between ::apply
    returning such a funny error message (with a two-word
    command name, plenty of spaces in there too) and the
    ensemble's rewriting rules.
    
    
  2. login: "msofer"
  3. mimetype: "text/plain"
  4. username: "msofer"