#428 part(x) should give warning

closed
nobody
Lisp Core (471)
5
2009-11-06
2003-10-27
No

part(x) returns x.

This is of course perfectly consistent (the null case),
but it is certainly an error if actually input this way.

True, it might be useful in the case apply(part,cons
(expression,specifier)), where specifier is an argument,
possibly the empty list, but using apply this way is
somewhat unclean. I would prefer that there be an
explicit form of part where the specifier is a list. The
problem with that solution, of course, is that we'd then
need corresponding versionf of substpart, inpart,
substinpart. Yecch.

For now, I would recommend giving a warning message
for this case. It would be nice if there could, however,
be only one such warning per interaction. I don't think
we do anything like that right now.

Discussion

  • Robert Dodier

    Robert Dodier - 2006-07-11
    • labels: --> Lisp Core
     
  • Robert Dodier

    Robert Dodier - 2006-07-11

    Logged In: YES
    user_id=501686

    Same behavior in 5.9.3cvs.

    FWIW I don't see anything wrong here. part(x) => x is OK by
    me -- laissez faire et laissez passer.

     
  • Dieter Kaiser

    Dieter Kaiser - 2009-11-06

    The case part(expr) -> expr has been added to the documentation in Expressions.texi rev. 1.66.
    Closing this bug report as fixed.
    Dieter Kaiser

     
  • Dieter Kaiser

    Dieter Kaiser - 2009-11-06
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks