From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10261c,90121986704b5776 X-Google-Attributes: gid10261c,public X-Google-Thread: 109fba,4873305131bf4d94 X-Google-Attributes: gid109fba,public X-Google-Thread: 1014db,4873305131bf4d94 X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,4873305131bf4d94 X-Google-Attributes: gid103376,public X-Google-Thread: 10c950,90121986704b5776 X-Google-Attributes: gid10c950,public X-Google-Thread: fdb77,4873305131bf4d94 X-Google-Attributes: gidfdb77,public From: kaz@helios.crest.nt.com (Kaz Kylheku) Subject: Re: English SUCKS, Chinese is the only language you need!! Date: 1997/11/19 Message-ID: <64vdch$bt4$1@helios.crest.nt.com>#1/1 X-Deja-AN: 290800235 References: <34557f2b.1934172@news.mindspring.com> <64suum$5oo$1@weber.videotron.net> <64tnjp$o0k$1@weber.videotron.net> Organization: A poorly-installed InterNetNews site Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.lang.java.advocacy,comp.lang.pascal.ansi-iso,comp.lang.pascal.misc Date: 1997-11-19T00:00:00+00:00 List-Id: In article <64tnjp$o0k$1@weber.videotron.net>, Jean-Sebastien Payette wrote: > >Dennis Weldy wrote in message ... >>It is? Care to offer a bit of proof there? >>Standard Pascal was, last I looked woefully lacking in file handling. >>Strings were packed arrays of chars (much like C). >> >>Now, perhaps y'mean Object Pascal, from Borland? Yes, that would be better >>at handling objects "better" than C, since C doesn't directly support the >OO >>paradigm. Of course, if y'try to compare it to C++....then I would disagree >>(and yes, I do know Object Pascal (BP 7.0)). >> >>Dennis >> > > >Ok sorry I was talking about C++, I never really code in pure C. >I must agree that I was a little overhelm stating that object pascal was >better than C ( oups! C++) but not string manipulation. I hate string >manipulation in C++. Damn strdup() that make everything fall appart... You are confusing implementations and languages again. The strdup() function is not part of C. It's an extension that is found in some implementations. I believe it has descended from the System V Interface Definition. Nevertheless, it is sometimes useful in a C program to execute an operation that has the semantics of strdup. What do you find wrong with it? You have a string that is in some static or automatic buffer. This string must be maintained for a duration that is longer than the lifetime of the buffer, or because that buffer will be reused for subsequent I/O operations. You have little choice but to copy the string to dynamically allocated storage. I have no clue what you are complaining about. Such an operation might be required in _any_ language which does not hide storage management details from the programmer. You talk as if you lack programming experience.