News for hackers. Stuff that matters.
Re:C++ in Coders at Work by alrex021 on Friday October 16, 2009 @02:15PM (#885880)
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)
Re:C++ in Coders at Work by haberman on Friday October 16, 2009 @04:03PM (#886069)
> 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?

Re:C++ in Coders at Work by scott_s on Friday October 16, 2009 @02:59PM (#885970)
Not 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.