comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Fun with C
Date: Wed, 20 Apr 2011 18:14:48 -0500
Date: 2011-04-20T18:14:48-05:00	[thread overview]
Message-ID: <ionpde$equ$1@munin.nbi.dk> (raw)
In-Reply-To: 86748003-860f-4729-ae26-55be1e58ac2b@d27g2000vbz.googlegroups.com

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 6762 bytes --]

"Elias Salom�o Helou Neto" <eshneto@gmail.com> wrote in message 
news:86748003-860f-4729-ae26-55be1e58ac2b@d27g2000vbz.googlegroups.com...
>On Apr 18, 8:10 pm, "Randy Brukardt" <ra...@rrsoftware.com> wrote:
>> "Elias Salom�o Helou Neto" <eshn...@gmail.com> wrote in 
>> messagenews:d169b543-eed4-4a0a-a295-e391c198463e@j9g2000prj.googlegroups.com...
>> On Apr 17, 8:43 pm, "Nasser M. Abbasi" <n...@12000.org> wrote:
>> ...
>>
>> >> I must have been doing something really wrong all those years,
>> >> becuase the only way I learned a new language was by
>> >> programming in it.
>>
>> >Without even reading a book about it? You are doing things terribly
>> >wrong. Of course programming is the best way to learn, but not without
>> >a good book to read while practicing.
>>
>> There aren't always books to read.
>
>C books? Come on!

We're not talking about C specifically, we're talking about "a new 
language".

>> We wrote a partial Ada *compiler* back in
>> 1980 from a description circulated by our professor (Janus/Ada originally
>> started in a compiler construction course).
>
>Surely the first Ada compiler you wrote wasn't coded in Ada itself.
>Haven't you read any book about the language used to code the compiler
>before?

Sure, but irrelevant, since we had to create test programs for the compiler 
in Ada (gotta test that it works), and that requires some understanding of 
the language.

> Weren't the professor's description a kind of "book"?

Depends on what you meant by "good book". A raw language description (as in 
the professor's handful of mimographed sheets) or even the Ada Reference 
Manual doesn't seem to be a "good book" about programming in the language. I 
had presumed that you meant "textbook" when you said "book", because 
otherwise your statement doesn't seem to say anything useful (by definition 
you'd have to read a language description to program, but there is no such 
requirement to read a book about how best to program in a particular 
language).

Even so, the professor's description looked nothing like a "book", in any 
sense of the term. So you have to be so expansive about the meaning of 
"book" to have made a meaningless statement.

> So keep saying people that they do not need to study the language they
> intend to write code on. This is really smart, isn't it?

Huh? I said no such thing. I simply said that you don't necessarily need a 
"book". I meant "textbook" when I said that, but it is really strictly true 
as well: you need a "language description", but it surely doesn't need to be 
in the form of a book -- it could be a handful of loose pages, it could be a 
a web site somewhere, a help file, or even a program editor.

Go back and re-read the statement that you made: "...but not without a good 
book to read while practicing.". I disagree with this statement as written, 
and I explained why. I also didn't feel any need to insult you when 
disagreeing with you, which does not help your point any.

>> The only book that we had (and
>> we didn't get that until near the end of the class when we had already
>> decided to commercialize it) was the 1980 Ada Reference Manual.
>
>So you're again trying to claim you have written a compiler without
>knowledge of the language to be compiled? It must be some kind of
>magic, for sure. Again, what about the description by your teacher?

It surely was not a "book". And by no stretch of the imagination, a "good 
book"!

These days, I hardly expect anyone to expect requiring a "book" to do 
anything. Even counting "e-books" as "books", there are a lot of information 
sources which have nothing to do with "books". It was a lot harder to 
understand back in 1981, yet it still happened then (and even then there 
were a lot of information sources having nothing to do with books - papers, 
magazine articles, seminars, lectures, computer-aided-instruction).

>> I'm pretty
>> sure that we had already converted the entire compiler into Ada code (so 
>> it
>> could compile itself) before we saw any of the early Ada textbooks. (The
>> Pyle textbook that we distributed with the compiler didn't come out until
>> late 1981, I think.)
>
>After writing an Ada compiler it is very unlikely for someone not to
>know the language. There are lots of C textbooks, why not to use them?
>Nonsense.

We're not talking about C specifically, we're talking about "a new language" 
in general.

And I doubt I would *buy* a textbook these days; pretty much everything one 
needs is on-line (and often not in the form of a book!).

>Also, please notice that I've recommended a book for those that are
>learning the language, not for those who have already mastered it (but
>even so a good reference manual is invaluable).

Again, I don't give a hose about C; I see no reason to waste my time with 
obscure language wars. (Ada is best, and that's it. :-)

>> That was OK, Ada wasn't that different than Pascal which we both already
>> knew well.
>
>This is dangerous. People seem to believe C is like Pascal or BASIC.
>Is this knowing C? This is the kind of misconception we have to fight.

Maybe *you* have to fight it. I happen to think that a language that is 
unnecessarily different than what a typical programmer would expect is 
dangerous. (And yes, Ada suffers from this in a few places as well -- and 
those things are also dangerous.)

A lot of people (not me, thankfully) have to program in a polyglot of 
languages, and remembering the obscure rules of one or the other without 
confusing them is difficult. We had this problem in the first year of 
Janus/Ada, when we were programming in Pascal, Modula I (for classes), and 
Ada all at the same time. Lots of mistakes made where they differed --  
luckily most of those were compile-time failures and thus didn't cause bugs.

>No programmer should claim to know C (or any other language) if he/she
>doesn't really knows it.

I don't claim to know C (anymore), but that doesn't prevent me from hating 
it. :-)
The one project I was forced to write in C (rather than Pascal or Modula) 
during my university days was the only such project that didn't work at the 
deadline. (And I was annoyed enough to spend several hours afterwards 
figuring out why it didn't work - the bug turned out to be a missing pointer 
dereference which the C compiler was happy to ignore.) Since then, I've 
learned to detest the C syntax -- I don't even get to hating the semantics. 
The only C I do is to read it well enough to be able to write interfaces to 
C APIs.

I realize this is somewhat irrational, which is why I try to stay out of 
language wars -- there is no way to win (I'm more likely to marry a 
supermodel than I am to change my mind about C! :-)

                                       Randy.





  reply	other threads:[~2011-04-20 23:14 UTC|newest]

Thread overview: 124+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-16 17:02 Fun with C George P.
2011-04-16 20:04 ` Nasser M. Abbasi
2011-04-16 21:12   ` Ludovic Brenta
2011-04-16 21:42     ` jimmaureenrogers
2011-04-17  7:17     ` Georg Bauhaus
2011-04-17  8:29       ` Martin
2011-04-17 18:19       ` George P.
2011-04-17  8:40     ` Georg Bauhaus
2011-04-18  1:04     ` Peter C. Chapin
2011-04-18  2:14       ` George P.
2011-04-16 22:03   ` George P.
2011-04-17  6:26 ` KK6GM
2011-04-17  6:59   ` Georg Bauhaus
2011-04-17 16:15     ` KK6GM
2011-04-17 19:35       ` Elias Salomão Helou Neto
2011-04-17 20:18         ` KK6GM
2011-04-18 19:47           ` Elias Salomão Helou Neto
2011-04-18 22:11             ` Peter C. Chapin
2011-04-17 22:26         ` Georg Bauhaus
2011-04-18 19:12           ` Elias Salomão Helou Neto
2011-04-18 20:56             ` KK6GM
2011-04-18 21:01             ` Georg Bauhaus
2011-04-18 21:20               ` Nasser M. Abbasi
2011-04-19  2:43                 ` George P.
2011-04-19 18:05                   ` Vinzent Hoefler
2011-04-19 19:34                     ` George P.
2011-04-19 20:08                       ` Georg Bauhaus
2011-04-19  1:10               ` Elias Salomão Helou Neto
2011-04-19 14:28                 ` Georg Bauhaus
2011-04-19 17:40                   ` Jeffrey Carter
2011-04-21 14:52                   ` Elias Salomão Helou Neto
2011-04-21 18:58                     ` Georg Bauhaus
2011-04-21 19:27                       ` Hyman Rosen
2011-04-28  5:13                         ` David Thompson
2011-04-28 13:41                           ` Hyman Rosen
2011-05-05  8:39                             ` David Thompson
2011-04-25 11:06                 ` Paul Colin Gloster
2011-04-25 11:00                   ` Georg Bauhaus
2011-04-25 12:12                     ` Martin
2011-04-25 18:39                       ` Paul Colin Gloster
2011-05-08 23:41           ` wilso
2011-05-20 10:41             ` Yannick Duchêne (Hibou57)
2011-05-20 16:04               ` Yannick Duchêne (Hibou57)
2011-04-18  0:12         ` George P.
2011-04-18 19:24           ` Elias Salomão Helou Neto
2011-04-19  1:22             ` George P.
2011-04-19  2:06               ` Elias Salomão Helou Neto
2011-04-19  2:37                 ` Bill Findlay
2011-04-19  3:00                 ` George P.
2011-04-17 19:19 ` Elias Salomão Helou Neto
2011-04-17 23:26   ` Gautier write-only
2011-04-17 23:43     ` Nasser M. Abbasi
2011-04-18 19:16       ` Elias Salomão Helou Neto
2011-04-18 23:10         ` Randy Brukardt
2011-04-19  1:36           ` Elias Salomão Helou Neto
2011-04-20 23:14             ` Randy Brukardt [this message]
2011-04-21 16:19               ` Elias Salomão Helou Neto
2011-04-21 17:36                 ` Dmitry A. Kazakov
2011-04-21 17:43                   ` Hyman Rosen
2011-04-21 19:44                     ` Dmitry A. Kazakov
2011-04-22  6:16                   ` Elias Salomão Helou Neto
2011-04-22  9:21                     ` Dmitry A. Kazakov
2011-04-22 13:18                       ` Hyman Rosen
2011-04-22 15:17                         ` Dmitry A. Kazakov
2011-04-23  2:08                       ` Elias Salomão Helou Neto
2011-04-23  7:23                         ` Dmitry A. Kazakov
2011-04-23  9:42                           ` Georg Bauhaus
2011-04-23 10:23                             ` Dmitry A. Kazakov
2011-04-23 18:37                           ` Elias Salomão Helou Neto
2011-04-23 21:36                             ` Dmitry A. Kazakov
2011-04-24 11:27                               ` Peter C. Chapin
2011-04-24 13:53                                 ` Dmitry A. Kazakov
2011-04-24 19:07                                   ` Nasser M. Abbasi
2011-04-24 19:46                                     ` Dmitry A. Kazakov
2011-04-24 21:20                                       ` Nasser M. Abbasi
2011-04-24 22:33                                         ` Elias Salomão Helou Neto
2011-04-25  7:09                                         ` Dmitry A. Kazakov
2011-04-25 20:46                                           ` Maciej Sobczak
2011-04-25 21:19                                             ` George P.
2011-04-26  6:18                                             ` Dmitry A. Kazakov
2011-04-26  6:58                                               ` Nasser M. Abbasi
2011-04-26  8:39                                                 ` Dmitry A. Kazakov
2011-04-26 20:57                                               ` Maciej Sobczak
2011-04-27  8:00                                                 ` Dmitry A. Kazakov
2011-04-27  8:19                                                   ` Georg Bauhaus
2011-04-27  9:32                                                     ` Dmitry A. Kazakov
2011-04-28  7:02                                                   ` Maciej Sobczak
2011-04-28  7:41                                                     ` Dmitry A. Kazakov
2011-04-28 10:24                                                       ` Peter C. Chapin
2011-04-28 13:56                                                         ` Dmitry A. Kazakov
2011-05-03  1:19                                                           ` Nasser M. Abbasi
2011-05-03  6:05                                                             ` J-P. Rosen
2011-05-03  6:15                                                               ` Ludovic Brenta
2011-05-03  7:43                                                                 ` Dmitry A. Kazakov
2011-05-03 15:34                                                               ` Bill Findlay
2011-05-03  7:53                                                             ` Georg Bauhaus
2011-05-03  9:29                                                             ` Simon Wright
2011-04-24 22:23                                       ` Elias Salomão Helou Neto
2011-04-25  7:10                                         ` Dmitry A. Kazakov
2011-04-24 20:37                                 ` Georg Bauhaus
2011-04-23 15:23                         ` George P.
2011-04-23 17:28                           ` Nasser M. Abbasi
2011-04-23 17:52                             ` Dmitry A. Kazakov
2011-04-23 18:11                               ` Nasser M. Abbasi
2011-04-23 20:47                               ` George P.
2011-04-24 11:36                                 ` Peter C. Chapin
2011-04-25 11:43                                   ` Paul Colin Gloster
2011-04-23 16:56                         ` Nasser M. Abbasi
2011-04-23 18:45                           ` Elias Salomão Helou Neto
2011-04-22 12:15                     ` J-P. Rosen
2011-04-22 14:56                       ` Niklas Holsti
2011-04-21 23:29                 ` Randy Brukardt
2011-04-22  6:29                   ` Elias Salomão Helou Neto
2011-04-25 11:22                 ` Paul Colin Gloster
2011-04-18 19:13     ` Elias Salomão Helou Neto
2011-04-20  5:11   ` J-P. Rosen
2011-04-20 15:45     ` KK6GM
2011-04-20 19:04     ` Vinzent Hoefler
2011-04-20 21:09       ` Georg Bauhaus
2011-04-20 22:52         ` Vinzent Hoefler
2011-04-21 14:18     ` Elias Salomão Helou Neto
2011-04-21 16:22       ` Vinzent Hoefler
2011-04-21 19:25         ` John B. Matthews
2011-04-23 23:07 ` Gerd
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox