Lisp vs. C++ (not off-topic)

Lionello Lunesu lionello at lunesu.remove.com
Fri Oct 13 11:04:03 PDT 2006


"Don Clugston" <dac at nospam.com.au> wrote in message 
news:egoc9c$lfm$1 at digitaldaemon.com...
> Lionello Lunesu wrote:
>> While trying to understand the c++ implementation, I found out what the 
>> problem was. The c++ version does not allow a digit at position k if 
>> there's a word in the dictionary that matches the digits at k..n, even if 
>> that word cannot actually be used in the encoding because of a mismatch 
>> anywhere after n.
>>
>> For example 30694, there IS a word matching "306", "sei" and therefor, 
>> the result "3-/0--69-4: 3 echt" is not considered..
>>
>> L.
>
> So the C++ version wasn't merely more complicated and slower than D, it 
> was also wrong??

I would say: yes :)

But, I don't really know what's right and what's wrong, since the 
description could be interpreted either way. I'd say the way the C++ version 
is doing it makes no sense logically.. The fact that there's a word "sei" in 
the dictionary should not prevent a good result "3 echt" from being 
considered.

L. 





More information about the Digitalmars-d mailing list