[erlang-questions] What is wrong with this list?

Dustin Sallings dustin@REDACTED
Tue Sep 4 22:28:09 CEST 2007


On Sep 4, 2007, at 13:05 , David Hopwood wrote:

> I'm afraid it *is* obfuscated, compared to stack traces typically  
> produced
> by other languages. It also doesn't contain enough information for
> debugging: ideally you would want both sides of the failed pattern  
> match.

	You're not going to get a very useful stack from something entered  
interactively in any language:

 >>> {}[1]
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
KeyError: 1

	That looks very similar to me to

1> 0 = 1.
** exited: {{badmatch,1},[{erl_eval,expr,3}]} **


	I'd do a java case, too, but I'm trying to keep this email short.   
All three roughly do the same thing.  They tell you your input was  
wrong.  If you're somewhere within code, they tell you about where  
you were.  They very rarely tell you about what your input was trying  
to match (e.g. the python dict match doesn't show me the dict).

-- 
Dustin Sallings





More information about the erlang-questions mailing list