continue, break, and goto?

5 views
Skip to first unread message

Bob Carpenter

unread,
Jun 24, 2013, 6:13:19 PM6/24/13
to stan...@googlegroups.com
[moving discussion to stan-dev]

On 6/24/13 6:08 PM, Michael Betancourt wrote:

> I didn't see a continue in the modeling language specification -- is there one hidden but not documented?

Nope. No continue, break, or goto yet.

They'd be easy to add, of course. Feel free to add
them to the to-do list. I can knock off this kind of
stuff pretty quickly. Though I'm not sure it's a great
idea.

- Bob

Michael Betancourt

unread,
Jun 24, 2013, 7:13:20 PM6/24/13
to stan...@googlegroups.com
Let's not worry about them until we have a few more requests.
> --
> You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Marcus Brubaker

unread,
Jun 24, 2013, 8:55:45 PM6/24/13
to stan...@googlegroups.com
continue and break would be useful, but I'm hesitant to support adding goto because it's just bad practice, particularly in a language as high level as Stan.  Goto would also require that we add annotations to the langue, to mark locations to which to go.

Cheers,
Marcus

Bob Carpenter

unread,
Jun 25, 2013, 11:47:12 AM6/25/13
to stan...@googlegroups.com


On 6/24/13 8:55 PM, Marcus Brubaker wrote:
> continue and break would be useful, but I'm hesitant to support adding goto because it's just bad practice, particularly
> in a language as high level as Stan. Goto would also require that we add annotations to the langue, to mark locations
> to which to go.

That's my feeling, too. Unlikely anyone's going to need
to implement a crazy enough algorithm that they need goto (though
it can be useful).

I'll drop these onto the to do list. Shouldn't be hard to add
at all as they'll translate directly into C++. I've seen a lot
of inexperienced programmers get confused about the scope of
break and continue relative to conditionals, but then it's unlikely
most of our users are going to use them anyway.

- Bob

Michael Betancourt

unread,
Jun 25, 2013, 11:50:59 AM6/25/13
to stan...@googlegroups.com
Can't we just an expert mode, say requiring the user to authenticated to Stan Premium?  

It's an instant money making opportunity!  Or at least another chance to introduce another Konami code Easter egg.




- Bob

--
You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages