2 ms·
Not enough data types in CL or Scheme's reader (Clojure wins here) and no standard between the lisps. But, there was something Lisp did right that no other mai
by JulianMorrison 17y ago
Not enough data types in CL or Scheme's reader (Clojure wins here) and no standard between the lisps.
But, there was something Lisp did right that no other mainstream scripting language has - it separated the reader and the evaluator. You can eval Perl or Ruby or Python, but not securely read it. This goes for Javascript too - you can eval a JSON, but you'd be an idiot.
- anamax 17y ago> Not enough data types in CL [reader] Huh? CL's reader handles structs, hashes, and vectors in addition to strings, lists, atoms (with packages), lots of number formats (including Roman), and the ability to express AGs, not just trees (yes, cyclic too). Plus some other things that I forget. (Arrays?) What else do you want to read? No matter - CL's reader is programmable....
- JulianMorrison 17y agoYou can do hashes in the CL reader? How? I don't recall being able to, from back when I was trying out CL. It's probably bad you can express cyclic graphs. That means you'll have to watch for denial-of-service attacks phrased as cyclic data. Programmable reader isn't the point. That gets you back into defining your own syntax. The point is to have a standard.
- anamax 17y ago> > It's probably bad you can express cyclic graphs. That means you'll have to watch for denial-of-service attacks phrased as cyclic data. You can turn it off. However, if cyclic graphs (or general DAGs) are important, supporting them means that you don't have to roll your own. > Programmable reader isn't the point. That gets you back into defining your own syntax. The point is to have a standard. The writer and reader have to agree no matter what you do. A programmable reader means that you don't have to roll your own in more cases. And, it makes it easier to test the third-party writers. (The reader folks can just publish the read-table.)