History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: BOO-365
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Rodrigo B. de Oliveira
Reporter: Rodrigo B. de Oliveira
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Boo

allow yield to be used without an expression

Created: 22/Jun/05 08:15 AM   Updated: 27/Jun/05 09:36 PM
Component/s: Parser, Compiler
Affects Version/s: 0.5
Fix Version/s: 0.5.6

Time Tracking:
Not Specified


 Description  « Hide
This will make boo more friendly to coroutine lovers.

An yield statement without an expression will be equivalent to 'yield <zero value for the inferred domain>', in other words:

def foo():
yield 1
yield # equivalent to yield 0
yield 3

def bar():
yield "foo"
yield # equivalent to yield null

When there is no inferred value (only yields without expression arguments) all yields fallback to 'yield null' and the type of the generator item is inferred to be 'object'.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.