News for hackers. Stuff that matters.
Re:How to implement strings by kazinator on Saturday November 03, 2018 @07:20PM (#18373036)
A string in C is entirely built upon convention; it exists in the words of a document only.

Common Lisp has a list class that you can specialize a CLOS method on.

Also:

  [1]> (typep nil 'list)
  T
  [2]> (typep '(a) 'list)
  T
  [3]> (typep 3 'list)
  NIL
And:

  [4]> (subtypep 'cons 'list)
  T ;
  T
  [5]> (subtypep 'null 'list)
  T ;
  T
So, kind of apples and oranges.
Re:How to implement strings by CodeArtisan on Saturday November 03, 2018 @08:47PM (#18373356)
I was referring to John McCarthy's definition of a list. IIRC, Common lisp's list type includes both proper and unproper lists. (typep (cons 1 2) 'list) evaluates to true but (length (cons 1 2)) throws a type error (not a list).