Yeah, I like that idea. It's like strconv.ParseBool, etc., too. 

> On Nov 3, 2013, at 21:23, crazy2be <notifications@github.com> wrote:
> 
> In errors.go:
> 
> > @@ -53,5 +53,5 @@ func (r errorValue) Error() string {
> >  		panic("errorValue.ref is nil")
> >  	}
> >  	v := r.ctx.newValue(r.ref)
> > -	return r.ctx.ToStringOrDie(v)
> > +	return v.ToStringOrDie()
> Yeah, I was thinking about what to do with these. You could call them MustToString() (like the regexp package), or make a .ToString() that will never fail (and returns an empty string when the underlying method gives an error), along with a .TryToString() that returns an error. I think in most cases you really don't care about whether or not you actually got a "valid" value, and you would rather just keep on going.
> 
> Actually, otto's API for this is fairly nice- it always returns sane defaults, and an error. You can just ignore the error if you don't care about it: https://github.com/robertkrimen/otto
> 
> —
> Reply to this email directly or view it on GitHub.