[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: programming

On Mon, Nov 05, 2001 at 01:17:15PM -0600, Dimitri Maziuk wrote:
| * J.A.Serralheiro (mrserra@ci.uc.pt) spake thusly:
| > so, there is no way to know in advance the length of a string unless you
| > have an identifier, or constant for it. 
| Que? You can't know $FOO of $BAR until you take $BAR in and see what
| sort of $FOO it has. You can't know the length of a string until you 
| read it in and count the characters.

Right, but if you don't know ahead of time that the sequence of
characters is NUL terminated, how do you know when to stop counting

| Shroedinger's Cat (there is no "string" in C, BTW)

That's a large part of the problem, IMO.

This discussion supports a quote that I like :
    "Don't use C;  In my opinion,  C is a library programming language
     not an app programming language."  - Owen Taylor (GTK+ developer)

C is great of low-level, close-to-the-metal, sort of programming like
kernels, device drivers, and interpreters.  However for application
development, where high-level data structures, logic, and interactions
are common a higher level language is much more appropriate and is
likely to reduce development effeort required.


Reply to: