Re: [C] loop termination question

From: Curley Q. (curleyq_at_bogus.net)
Date: 08/07/04


Date: Sat, 07 Aug 2004 18:19:49 GMT

Jerry Coffin wrote:
> "Curley Q." <curleyq@bogus.net> wrote in message news:<411428EB.7090701@bogus.net>...
>
> [ ... ]
>
>
>>>while ( (c=fgetc(infile) != EOF)
>>
>>Thanks. After giving it a little more thought, this is what I
>>ended up doing. BTW, you're short a parenthesis in the above
>>expression, but who's counting?
>
>
> Oops -- you're quite right. My apologies (or is this where I'm
> supposed to pull out one of those lines about wanting to check that
> you were really reading what I posted? :-)

Nah. Only Francis Glassborrow does that. Just kidding, Francis;
just kidding.

>
> [ ... ]
>
>
>>> linecount += (c == '\n');
>>
>>Is this idiomatic? :-)
>
>
> By whose definition of "idiom"?
>
> "Idiom" has a number of definitions that are similar when applied to
> natural languages, but become substantially different when applied to
> programming languages.
>
> Specifically, an idiom is an expression that is understood by native
> speakers of the language. This is often used to mean something that
> can ONLY be understood by a more or less native speaker of the
> language -- specifically, an expression whose overall meaning can't be
> inferred from the meanings of the words that make it up (e.g. "cool"
> to mean all manner of things unrelated to temperature).
>
> I'd say anybody who knows C well should be able to figure out what
> this means, though it might take some a little though. One of the
> fundamental differences between programming languages and natural
> languages is that in programming there's no such thing as an idiom by
> the second definition -- a properly functioning computer always
> follows definitions of things exactly as they're given to it, and no
> matter how complex an expression gets, it's always possible to deduce
> its meaning as a composition of the individual components (and, in
> fact, a parser does exactly that).
>
> (How's that for a typically programmer-like response, of giving a
> long, dull and all-too-serious answer to a light-hearted question?)
>

A virtuoso performance, to be sure.



Relevant Pages

  • Computer Languages
    ... the number of languages known to be spoken by the peoples of ... all the computer languages have sprung up in just 50 ... any pair of human languages. ... Almost all programming languages are built on the ...
    (soc.retirement)
  • Re: Why is OO Popular?
    ... This research allows us to understand the basics of understanding ... Another way of putting it is we can program different types of languages ... try to formalize them for programming purposes while the brain is much ... they don't like like dynamic programming languages. ...
    (comp.object)
  • googling for fun (and profit...? naah!-)
    ... python ruby perl caml java haskell lisp eiffel sml scheme ... with the programming languages as I thought of them. ... programming isn't as popular a term as I'd have thought (but still, ...
    (comp.lang.python)
  • Re: [C] loop termination question
    ... "Idiom" has a number of definitions that are similar when applied to ... natural languages, but become substantially different when applied to ... an expression whose overall meaning can't be ... fundamental differences between programming languages and natural ...
    (alt.comp.lang.learn.c-cpp)
  • PLMMS 2009: First Call for Paper
    ... The ACM SIGSAM 2009 International Workshop on Programming Languages ... for Mechanized Mathematics Systems will be co-located with TPHOLs 2009. ... Final Papers Due: July 10, ...
    (sci.math.symbolic)

Loading