Clojure

GC Issue 27: Disallow recur across try

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: Release 1.3
  • Component/s: None
  • Labels:
    None
  • Approval:
    Ok

Description

Reported by richhickey, Jan 01, 2009
Right now will allow:

(loop [x 42]
  (when (pos? x)
    (binding [*out* *out*]
      (recur (dec x)))))

but the recur doesn't (can't) really happen in the scope of the binding

Activity

Hide
Assembla Importer added a comment -

richhickey said: Updating tickets (#8, #19, #30, #31, #126, #17, #42, #47, #50, #61, #64, #69, #71, #77, #79, #84, #87, #89, #96, #99, #103, #107, #112, #113, #114, #115, #118, #119, #121, #122, #124)

Show
Assembla Importer added a comment - richhickey said: Updating tickets (#8, #19, #30, #31, #126, #17, #42, #47, #50, #61, #64, #69, #71, #77, #79, #84, #87, #89, #96, #99, #103, #107, #112, #113, #114, #115, #118, #119, #121, #122, #124)
Hide
Assembla Importer added a comment -

hiredman said: [file:aeZrIo4kWr352reJe5cbCb]: patch to disallow recur across try

Show
Assembla Importer added a comment - hiredman said: [file:aeZrIo4kWr352reJe5cbCb]: patch to disallow recur across try
Hide
Assembla Importer added a comment -

hiredman said: [file:cffLE64syr369QeJe5cbLA]: try #2, patch to disallow recur across try

Show
Assembla Importer added a comment - hiredman said: [file:cffLE64syr369QeJe5cbLA]: try #2, patch to disallow recur across try
Hide
Assembla Importer added a comment -

hiredman said: did a try one, realized it didn't work and my tests were wrong, try 2 seems to actually work

Show
Assembla Importer added a comment - hiredman said: did a try one, realized it didn't work and my tests were wrong, try 2 seems to actually work
Hide
Stuart Halloway added a comment -

Patch does two (related) things:

  • throws compile-time exception if you recur across try
  • throws compile-time exception if you recur across dynamic binding

Rich: is this the desired behavior?

Show
Stuart Halloway added a comment - Patch does two (related) things:
  • throws compile-time exception if you recur across try
  • throws compile-time exception if you recur across dynamic binding
Rich: is this the desired behavior?
Stuart Halloway made changes -
Field Original Value New Value
Reporter Assembla Importer [ importer ]
Priority Blocker [ 1 ]
Approval Test Incomplete
Hide
Rich Hickey added a comment -

It would be nice if the tests confirmed ok things still work, e.g. a full loop/recur inside a try etc

Show
Rich Hickey added a comment - It would be nice if the tests confirmed ok things still work, e.g. a full loop/recur inside a try etc
Stuart Halloway made changes -
Priority Blocker [ 1 ] Major [ 3 ]
Hide
Kevin Downey added a comment -

well, dynamic bindings are a try/finally pushing and popping the bindings

Show
Kevin Downey added a comment - well, dynamic bindings are a try/finally pushing and popping the bindings
Hide
Kevin Downey added a comment -

try #3 at the patch, now with some tests to check that things that are ok to do are still possible

Show
Kevin Downey added a comment - try #3 at the patch, now with some tests to check that things that are ok to do are still possible
Kevin Downey made changes -
Attachment 31-recur-across-try3.diff [ 10025 ]
Aaron Bedra made changes -
Waiting On stu
Stuart Halloway made changes -
Approval Incomplete Screened
Waiting On stu richhickey
Rich Hickey made changes -
Approval Screened Ok
Waiting On richhickey
Stuart Halloway made changes -
Status In Progress [ 3 ] Closed [ 6 ]
Resolution Completed [ 1 ]

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: