Re: [sl4] How much do languages matter for AGI programming?

From: Philip Hunt (cabalamat@googlemail.com)
Date: Sun Nov 30 2008 - 03:20:30 MST


2008/11/30 J. Andrew Rogers <andrew@ceruleansystems.com>:
> On Nov 29, 2008, at 9:39 PM, Philip Hunt wrote:
>>
>> It's true that any Turing-complete language can emulate any other, but
>> that's not what I was talking about. The advantage of Lisp is that
>> it's *very easy* to implement another language in it, a lot easier
>> than going to the trouble of writing a compiler/interpreter.
>
> It depends on what you mean by "going to the trouble", though LISP does
> excel at this in many cases. For well-defined simple/elegant language/model
> implementations, there are a number of programming languages that can do
> most implementations in a trivial amount of code. I don't consider a
> complete language implementation in less than a hundred lines of code to be
> particularly onerous.

Nor do I. However implementing a simple language, including lexical
analysis and parsing, will take more lines than that. For example, I
currently have a project to implement a language of my design.
Literals in this language are roughly as complex as Lisp
s-expressions, and the lexical analyser, parser, storage management
for the created data structures, and unit tests for the above together
come to 2400 lines of code. This is a significant coding overhead IMO.

It's also the basis of my examples below where I show how languages
can be coded in Lisp and Python without having to write a lexical
analyser and parser.

> Absent that, you are left with a bunch of pragmatic concerns like
> comfort using the language and flexibility.

Indeed. Using a tool you know well and like is usually not a bad option.

-- 
Philip Hunt, <cabalamat@googlemail.com>
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html


This archive was generated by hypermail 2.1.5 : Wed Jul 17 2013 - 04:01:03 MDT