[e-lang] Bug (0.8.37d+): term`foo` pattern behavior changed
Kevin Reid
kpreid at mac.com
Sat Jan 20 14:34:16 CST 2007
On Jan 20, 2007, at 15:00, Mark S. Miller wrote:
> Kevin Reid wrote:
>> In E 0.8.36t,
>>
>> ? def term`foo` := term`foo(bar)`
>> # value: term`foo(bar)`
>>
>> In E 0.8.37d and SVN:
>>
>> ? def term`foo` := term`foo(bar)`
>> # problem: foo doesn't match: term`foo(bar)`
>>
>> This change has broken several term-using programs, and I do not
>> recall it being announced.
...
> Cases such as you show above can be fixed as follows:
>
> ? def term`foo at _` := term`foo(bar)`
>
> Sorry for the unpleasant surprise, and for the fact that I did not
> anticipate it, but I do not dislike the change in behavior.
I admit that this behavior is less irregular, but I dislike that the
change, which breaks existing programs, was not proposed, discussed,
and announced publicly.
If we want people to use E, we must make sure that incompatible
changes are thoroughly documented.
Also, I hope you are aware that requiring no arguments was already
specifiable as term`foo()`.
Also, term`foo at _` generates an unnecessary at-hole output, which
would be hard to optimize away. (term`foo(*)` appears to work and
does not have that problem, though, but is rather noisy.)
--
Kevin Reid <http://homepage.mac.com/kpreid/>
More information about the e-lang
mailing list