home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!munnari.oz.au!bruce.cs.monash.edu.au!goanna!ok
- From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe)
- Newsgroups: comp.lang.c
- Subject: Re: EASY C
- Message-ID: <14481@goanna.cs.rmit.oz.au>
- Date: 11 Sep 92 08:32:00 GMT
- References: <faivre.716116245@cst02> <1992Sep10.102835.20738@newshub.ccs.yorku.ca> <faivre.716143938@cst02>
- Organization: Comp Sci, RMIT, Melbourne, Australia
- Lines: 52
-
- In article <faivre.716143938@cst02>, faivre@cst02.segin.com (Denis Faivre) writes:
- > This is definitely no joke. I know someone seriously considering to "adapt" C
- > (for COBOL programmers, as you guessed it in your second message) by such a
- > technique as EASY C.
-
- I've had to deal with code which used
- #define or else if
- I am not kidding about that, and I was not at all pleased about it either.
- One of my reactions was "why aren't these cowboys willing to write in C?"
-
- The effect of using an idiosyncratic language loosely based on C (which is
- what a set of macros like EASY C is) is to
- - make sure that people who learn this language will have a hard time
- with C
- - make sure that people who know C will have a hard time with this
- language
- - confuse the heck out of support tools like `indent', `ctags',
- `cflow', `calls', `cxref', ...
- - seriously perturb the electric-C-modes provided by several editors
- - lose you a lot of friends (especially people who have to maintain
- the code afterward).
-
- Let's face it, the syntax is the EASIEST part of C to master.
- I just spent 3 hours yesterday and another 3 hours today helping a student
- with a C program. Her mastery of the _syntax_ was complete, but she didn't
- understand things like
- - how to read words from a file?
- while (fscanf(infile, "%80s", word) == 1) { process(word); }
- - how to build a linked list by inserting things at the end?
- typedef struct ListNode *ListPtr;
- struct ListNode { ListPtr next; SomeType item; };
- ListPtr result, *tail = &result, new;
- ...
- new = (ListPtr)emalloc(sizeof *new);
- new->item = something;
- *tail = new;
- tail = &(new->next);
- ...
- *tail = NULL;
- - what can cause a segmentation fault?
- in this case, using fopen() and not checking the result.
- - what is the difference between strcpy() and strncpy()?
- - how can I maintain a key->value mapping on disc?
- use ndbm(3) or sdbm(3L)
- - how do I debug a C program?
- [actually, she knew a pretty good method: ask a lecturer...
- We did try dbx, but it crashed...]
- and a whole bunch of stuff at that level.
-
-
- --
- You can lie with statistics ... but not to a statistician.
-