Mail Archives: djgpp/1996/12/19/08:17:17
On Monday, in article
<Pine DOT SUN DOT 3 DOT 91 DOT 961216174328 DOT 18715L-100000 AT is>
eliz AT is DOT elta DOT co DOT il "Eli Zaretskii" wrote:
> I'm NOT in holy war mode here, mind you. IMHO, the real problem with C++
> is not the code *we* write (upon which we have *some* control), but the
> code that is inside C++ class libraries which most people will use without
> looking up the sources. Now, while in C you will usually have an
> intuitive notion of how expensive a given operation should be, in C++ this
> is generally concealed in the inheritance hierarchy, and is beyond your
That is very true. Every language I learned before C (ie Basic + Pascal)
effectively overloaded the + operator to work with strings. This meant that
until I learnt C, where you have to do a lot of work to deal with strings,
I never really realised how expensive string routines were. Then comes
along C++ (looks just like Basic, IMVHO) letting people ignore again how
much work the computer has to do...
:sb) please send mail to <tw104 AT york DOT ac DOT uk> http://www.york.ac.uk/~tw104/
--
#include <stdio.h> /* The .splitbung super .sig system! */
#include <string.h>
main(){FILE*f;int c[1];char s[99];puts("sig:");fgets(s,99,stdin);if(!*c=strchr(s
,'\n'))s[c=0;f=fopen(s,"r");while((c=getc(f))!=EOF)putchar(c);f&&fclose(f)
- Raw text -