Re: Do all programming languages use files?



Ed Prochak said:

>
> Richard Heathfield wrote:
>> gswork@xxxxxxxxxxxx said:
>>
>> > it may be more interesting to ask if there is anything that *all
>> > programming languages* have in common*
>>
>> My three cents: Sequence, selection, and iteration.
>>
>
> Iteration is not necessarily common to ALL languages.

I'd be amazed to hear of a /programming/ language that doesn't support
iteration in some form or another.

> Obviously iteration can be done in a language with just Sequence,
> selection, and GOTO.

Right.

top:
INC x
FOO x
CMP x, y
JNE top


> And there is the less obvious language with Sequence, selection, and
> functions (as long as recursion is allowed, iteration can be
> implemented via recursion).

Then the language has a rather strange form of iteration. It might be a
nuisance to do, but it's still iteration.

> and How about languages with only sequence and selection (The loops are
> implied in nonprocedural languages like SQL.)

I don't really think of SQL as a programming language. It's more of a fairly
portable database API.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29 July 1999
http://www.cpax.org.uk
Email rjh at the above domain

.



Relevant Pages

  • Re: Do all programming languages use files?
    ... > My three cents: Sequence, selection, and iteration. ... Iteration is not necessarily common to ALL languages. ... Obviously iteration can be done in a language with just Sequence, ...
    (comp.programming)
  • Re: dp
    ... Three elements of structured programming are sequence, selection, and ... iteration. ... Sequence may seem trivial, but it's harder to get right than ...
    (comp.lang.c)
  • Re: need urgent help
    ... That would be sequence, selection, iteration *and* obfuscation. ...
    (comp.lang.java.programmer)
  • Re: *Naming Conventions*
    ... that don't support proper iteration over a sequence. ... And this is *exactly* what one should not do in Python. ... with many different language. ... prefixes - a convention I adopted in C++ at a time when I thought 'm' ...
    (comp.lang.python)
  • Re: Mutable reference to a structure field
    ... > I take your point about recursion/iteration. ... > iteration is because it's really no more difficult in this case, ... > it is a shame that there doesn't appear to be one in Common Lisp. ... programming language" and Graham's Lisp-DNA comparison. ...
    (comp.lang.lisp)