On Wed, 20 Sep 2006 14:08:16 +1000
Benno <[EMAIL PROTECTED]> wrote:

> That is a reasonable statement. I'm not sure that perl is very close
> to a natural language.

Perl is full of magic variables like $_, $^ and so on. I think amongst
most thinking Perl users, these things are nowadays frowned upon, but 
they are still available in the language and can still be abused to 
create completely unreadable programs.

> Python and Ruby maybe.

Yep, I consider Python and what little I've seen of Ruby as highly
readable.

> I believe Ocaml is reasonably english-like.

I also find Ocaml highly readable although would consider it closer 
to the language or mathematics than english. For instance:

    let _ =
        let x = 3 in
        let y = 2 in
        let z = x + y in
        print_endline ("z : " ^ (string_of_int z))

is a little like a mathematical proof. The only things that are not 
completely obvious there are that caret ('^') is the string 
concatenation operator and that the underscore means "execute
this code now".

> I would note that being english like is not necessarily a good thing
> imho.

I would agree very strongly with this. English is full of ambiguities
and software should be written in languages which are as unambiguous
as possible.

For example I once received a spam email with the subject line of 
"Meet men with larger breasts". As a man I thought "I don't want to
meet men with large breasts", but a woman might reasonable think "I
meet lots of men, why would I need larger breasts?". Can you imagine
programming a computer in a language with this level of ambiguity?

> Ideally you want a language which is close to the notation
> of the problem domain.

So maybe the notations of logic and mathematics? :-)

Erik
-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo
+-----------------------------------------------------------+
"There are only two things wrong with C++: The initial concept and
the implementation." -- Bertrand Meyer
_______________________________________________
coders mailing list
coders@slug.org.au
http://lists.slug.org.au/listinfo/coders

Reply via email to