4 ms·
You are absolutely right. My point exactly. Now you need "two hammers" to get a single job done. Your current programming language of choice and a data express
by alrex021 17y ago
You are absolutely right. My point exactly.
Now you need "two hammers" to get a single job done. Your current programming language of choice and a data expression language.
For example:
In C, C++, Java, or related, you "first" have to build you structure to represent a Person with first_name and last_name and then you have to write it to JSON:
Java:
class Person { String firstName; String lastName; }
JSON with JavaScript evaluation:
var names = [{"firstName": "John", "lastName": "Smith"}, {"firstName": "Bob", "lastName": "Jones"}]
eval("(" + names + ")");
Lisp handles both naturally. You don't need intermediary human-readable data expression language. It comes natural to the language itself.
Lisp ver:
(defvar names '((:firstName "John" :lastName "Smith") (:firstName "Bob" :lastName "Jones")))
(eval names)
- scott_s 17y agoNot all problems require communicating your data structure outside of the program. And I don't think it's accurate to say "Now you need." For problems where you do need to communicate data outside of the program, that's been true since the days of Fortran.
- haberman 17y ago> or example: In C, C++, Java, or related, you "first" have to build you structure to represent a Person with first_name and last_name Not if you're using Protocol Buffers, which is essentially a version of JSON that has "batteries included." > Lisp ver: Lisp is not the only programming language around. How am I going to consume that data from another language? Embed an entire Lisp interpreter?