Bob Carpenter
unread,Jan 11, 2013, 4:24:00 PM1/11/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to stan...@googlegroups.com
On 1/11/13 12:56 PM, Jiqiang Guo wrote:
>
> Just realized again I should not use equal sign (=) for assignment. (I just cannot get used to R's <-).
:-) I do that all the time myself. I'll see
if I can produce a better error message than what
we currently have:
EXPECTATION FAILURE LOCATION: file=../temp2/eqs.stan; line=3, column=3
x = 5;
^-- here
DIAGNOSTIC(S) FROM PARSER:
Parser expecting: "}"
What I'll have to do is get it to recognize
the '=' and then reject so I can throw a warning at
the right place.
It is jarring to go back and forth between C++
assignment (=) and R/Stan style (<-). I liked
the idea of using = for Stan, but we finally
decided that <- would be easier for BUGS, JAGS, and
R users.
I used to write R using = for assignment, but
I'd rather follow the standard idioms.
It'd be simple to add = for assignment to Stan,
but I don't like having two symbols that mean the
same thing.
- Bob