Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

From a compute standpoint I guess I'm wrong. But from a modeling power perspective, I definitely prefer the clarity and uniformity of Clojure's standard library functions. Maybe that has something to do with its distinct data types, maybe not.


What do you mean with 'distinct data types' ? Most lisps are strongly typed. SBCL even accepts type declarations.


Data structure types. In standard CL and Scheme, data structures are implemented at their base using cons cells, and their interpretation as tables, trees, queues, etc. is up to library functions. Unless I have somehow misinterpreted the selling points of classic Lisps, because Clojure and Janet data structures sell themselves as being not built this way. Clojure makes a different trade-off by building all its data structures off of hash array-mapped tries. But Janet goes out of its way to use efficient and closely-mapped base stores, even if the contained elements are dynamic Janet objects.


> In standard CL and Scheme, data structures are implemented at their base using cons cells

That's not true. Both CL and Scheme have other data structures besides cons cells, and that's been true for the Lisp family of languages for nearly 70 years now.

This bizarre belief that everything is a cons cell in Lisp and Scheme needs to go away.


Thanks for courteously linking me to the relevant documents! Very productive and good-natured of you.


> Thanks for courteously linking me to the relevant documents! Very productive and good-natured of you.

Thanks for the sarcasm! Very productive and good-natured of you.

For your reference:

LISP 1.5 manual: https://www.softwarepreservation.org/projects/LISP/book/LISP...

Arrays were present in 1960. Admittedly, not much else but clear evidence that even then it wasn't just cons cells.

https://www.lispworks.com/documentation/HyperSpec/Front/Cont... - Common Lisp Hyper Spec which describes data structures other than lists and cons cells.


For someone who initiated hostility, you're a dismal failure at supporting your arguments. I'm not reading two entire manuals to find the citations you're referring to and should've cited yourself.


> I'm not reading two entire manuals to find the citations you're referring to and should've cited yourself.

C-f that PDF for "array". For the other manual, I linked the TOC. It's right there on the page (arrays and hash tables, and you can follow up with structures and objects) and there's no reason to read the entire manual. I figured most people knew how to use a table of contents, I apologize if I expected too much from you.


Flavors, from 1979 or so.

https://www.softwarepreservation.org/projects/LISP/MIT/nnnfl...

LOOPS, from about the same time.

https://interlisp.org/documentation/2024-loops-book-1.pdf

More general discussion in a OOPSLA contribution from 1986.

https://web.archive.org/web/20220817140051/https://interlisp...

The 1988 book about CLOS, the approach that was later accepted in ANSI Common Lisp.

https://doc.lagout.org/programmation/Lisp/Object-Oriented%20...


Ok, so I am sorry but this is an extremely uninformed take. Please have a look around in Racket's documentation before going any further: https://docs.racket-lang.org/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: