This isn't a question, just an answer I found that I wanted to share.
I'm working on a model that heavily uses euclidean distances, which lend some awkwardness to the code. BUT, at some point in time (or maybe I missed it), the Stan team added a hypotenuse function (hypot(), page 423), that calculates the following function for two reals (x,y) --> sqrt( x^2 + y^2). So it only works for 2-D points, and it isn't vectorized, but still, a time-saver.
OK, commercial over... Just wanted to post this in case anyone has a similar coding issue.