> It seems allowing anonymous procs...

But it's allowed. I mean, this works:
    
    
    import sugar
    type Event = object
    proc on_click(fn: proc(e: Event): int) = discard
    on_click (e) => (echo e; 0)
    
    
    Run

The problem of "`on_click (e) => echo e`" is that it has `void` for return 
type, while ``=>`` uses `auto` in its implementation (It transforms the 
expression into something like `proc (e: auto): auto = echo e`). However, 
`auto` cannot be `void` (but can be anything else), so it never compiles. This 
means `sugar` needs a fix.

Reply via email to