Hi Alex and Henrik,

thanks for your feedback!

>> I think you take this matter too seriously.

:-)

>> The core of the problem is simply a 50-years-old fault in the Lisp
>> syntax: The "dot" notation is written with a dot, but it is desirable
>> to use the dot also in atoms (most notably in numbers). A better
>> design would have been to use some other meta character, e.g. the
>> vertical slash as in other languages. A "dotted" pair would then look
>> like (a | b)

Maybe.  Depends how you think about it.  It's not necessary a fault.
The thing is that people got used to lots of arbitrary restrictions and
don't want to think about how to make things simpler and more regular.
>From the practical point of view, there is no need as most cases I
presented don't happen in reality.  However, as somebody trying to
acquire deep understanding of Lisp and actually implement one, I think
it is important to know what is the core necessity and what is just
accidental complexity.  PicoLisp is quite unique in this regard compared
to other Lisp dialects as it throws away much of the unnecessary stuff
other languages put up with (and this is very hard as Saint-Exup=C3=A9ry
pointed out:-).  So please this as a constructive criticism;-)

>> Besides this, I think the situation in PicoLisp is clear and well-
>> defined: The dot is allowed as _part_ of a symbol name, but _not_ as
>> a symbol name per se. A stand-alone dot is a meta character.

Kind of, in the sense that one should avoid dot if possible which the
examples I sent demonstrate.

>> In all other situations (allowing the dot as a stand-alone symbol)
>> you will always create confusion.

I don't think so.  I have simple rules for the reader:

- dot is a symbol as any other

- if read inside a list, it means: place the next sexp into the current
  cells' cdr

- if the dot is the last sexp in the list, make the list circular

I don't think it can get any simpler.  And it is definitely much simpler
and more logical than the PicoLisp reader and any other Lisp reader I've
seen so far.

>>> ... <examples proving my statement omitted>

This might be the most interesting bit actually:-)

>> I think this makes things worse. Should a dot in these examples be a
>> single-dot-symbol, or does it mark a dotted pair? I would always prefer
>> to get an error here.

Why error?  Understanding of the three simple rules above is enough and
there are not any surprises and pathological cases.

> I agree with Alex, Tomas you should focus your energy on other less
> archaic things :)

As long as Alex enjoys the discussion, I think it's more fun to disagree
with him because that way we can come up with something interesting:-)

BTW my aim is to have a picolisp (subset) running in a web browser.  I
will implement it in Java first as it is easier to run, test and debug.
I have a native core (basic reader, printer, part of the evaluator and
Java FFI) working.  I still have to get my head around the apply issues
as discussed in another thread and implement evaluator of picolisp
functions.

Cheers,

Tomas
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to