aardappel / lobster

The Lobster Programming Language

Home Page:http://strlen.com/lobster

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Continue statement?

AntonBogun opened this issue · comments

I could not find any description on a continue statement which can be seen in other languages, and it does not seem to be a reserved identifier inside loops. Is this intentional or was it just not implemented yet?

I guess I've simply never had a need for it. It could definitely be added.

commented

is this planned to be added, or is this just a dead thread? continue would be super helpful for lots of projects.

is this planned to be added, or is this just a dead thread?

Neither. This is not an open source project with permanent staffing, so things get added when contributors feel like implementing things, not anything on a set priority or schedule.

I think the new guard statement could be used like a conditional continue... Correct me if I'm wrong but a separate continue statement shouldn't be necessary, you can always write guard false and it should be perfectly equal to an conventional continue

guard false only shortcuts the current block, so wouldn't allow for the more common if ...: continue.
Also, guard false never executes the statements following it, so would be non-sensical.