points
9 days ago
| 3 comments
| HN
Do you consider Common Lisp more "modern" than say Scheme or Racket?

As far as I know, the CL spec hasn’t been updated for 30+ years, and most of its design is far older.

tmtvl
9 days ago
[-]
Don't know much about Racket, but CL has type dispatch:

  (defmethod join ((a String) (b String))
    (concatenate 'String a b))
  ;; example: (join "abc" "def") => "abcdef"

  (defmethod join ((a Integer) (b Integer))
    (parse-integer (format nil "~D~D" a b)))
  ;; example: (join 123 456) => 123456
And rudimentary support for ADTs:

  (deftype Low-Score ()
    '(Integer 0 20))

  (deftype Normal-Score ()
    '(Integer 21 79))

  (deftype High-Score ()
    '(Integer 80 100))

  (deftype Score ()
    '(or Low-Score Normal-Score High-Score))
(But note that deftypes aren't allowed to recurse.)

CL also has first-class support for debugging with things like describe, step, and trace built-in.

EDIT: Yeah, the CL spec dates from 1994 and a bunch of things which we would expect nowadays (networking, POSIX,...) are provided by external libraries rather than being part of the spec, but in various ways CL is way ahead of its time.

reply
spauldo
8 days ago
[-]
I wouldn't consider a "moderness" comparison between CL and Scheme to be useful. They're too different in intent and capabilities.

CL has a more-or-less frozen standard, in the sense that it's unlikely to have an update. Scheme gets updated standards, but they seem to focus on refining Scheme rather than adding "modern" features. Both are very extensible and people do add modern features as implementation extras or libraries.

I can't comment about Racket. As an outsider, it appears to be a playground for hardcore CS types to experiment with different programming language features, which suggests it's the most "modern." That's just the impression I get, though - feel free to correct me on that.

reply
pjmlp
9 days ago
[-]
And yet we're still catching up on having features from Allegro Common Lisp and LispWorks more widespread across mainstream languages, where Java and .NET ecosystems are the closests in terms of IDE capabilities, graphical debugging, runtime introspection, JIT and AOT on the same package,.....

Which goes to show how many lessons the industry failed to learn on those 30+ years.

reply