Topic: malloc behavior...
Author: AllanW@my-dejanews.com
Date: 1998/09/17 Raw View
In article <d2fL1.25$yt.291150@burlma1-snr1.gtei.net>,
Barry Margolin <barmar@bbnplanet.com> wrote:
> In article <6tjs9n$k0d$1@nnrp1.dejanews.com>, <AllanW@my-dejanews.com>
wrote:
> >That goal can be achieved in the standard by being more explicit.
> >Perhaps wording like this:
> >
> > Whenever feasible, function printf() shall be implemented with the
> > following functionality:
>
> This doesn't really solve the problem. Who decides if something is
> "feasible"? Suppose the vendor says that they didn't don't printf() is
> feasible on a particular system, but the customer disagrees?
You omitted the rest of my proposal. It went on to state that if the
implementation was *not* feasible, then the vendor must document the
reasons why.
> So the best the standard can do is legislate something of the form "if
> printf()/malloc() does anything, this is what it does, otherwise it returns
> the following error indication."
This allows the vendor to trivially implement the function, possibly
for no good reason. (We didn't have enough programmers on the development
team!) They would still have a conforming implementation.
Under my proposal, the vendor is *still* free to trivially implement
the function, if there is some good reason. However, the vendor is
required to state what the reason is. For instance, "The system is
intended for use on embedded systems, without any predictable
hardware for standard output." This is an excellent reason. OTOH,
"We didn't have enough programmers to implement this and still
ship soon enough to generate 4th-quarter revenue." This is a reason
that's likely to be taken to court. And if no reason was given at
all -- well, then it wouldn't be a conforming system.
--
AllanW@my-dejanews.com is a "Spam Magnet" -- never read.
Please reply in USENET only, sorry.
-----=3D=3D Posted via Deja News, The Leader in Internet Discussion =3D=3D=
-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]