in reply to Re: Re: Common Words, Perl Keywords
in thread Common Words, Perl Keywords
The movement towards making programming languages as close to English as possible was a big failure (see also: COBOL, FORTRAN). However, following the principles of natural languages doesn't necessarily mean you have a lot of English-like words in your syntax (or French-like, or German-like, or whatever). Rather, it means code is structured in a similar way.
For instance, you might say "Release the sheep, unless it's raining". Wheras in Perl you could say $sheep->release unless is_raining();. Another example is the use of a pronoun: $_. How many times do you say 'it' in normal English speech? A bloody lot of times. $_ is used similarly.
This isn't to say that other programming languages don't have some aspects of natural language in them. The difference is that natural language is all but an explicit design goal in Perl.
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
: () { :|:& };:
Note: All code is untested, unless otherwise stated
|
|---|