C doesn't much seem like an HLL to me. Perhaps more of an MLL (Middle
Level Language). I've also heard it called sumething like a structured
assembler language. And, like assembler, it doesn't protect you from
yourself. It is simple to overrun a string's area in both assembler
and C if you aren't careful. Even if you implement something like
PL/I's strings. For best protection against this sort of thing, I
thing the AS/400 (S/38?) and its descendant are likely the best
choice. I don't think it is even theoretically possible to overflow an
objects defined area. The millicode equivalent make it impossible.
TIMI Ithe iSeries defined archetecture) is fascinating to me.

On Fri, May 17, 2013 at 7:23 AM, John Gilmore <[email protected]> wrote:
> The unfortunate decision was Ritchie's original one to treat character
> strings as arrays of single characters.
>
> All this was part of an episteme that viewed smallness/minimality and
> notional portability as highly desirable, crucial language
> characteristics.  They are, of course, appealing; but they are also
> absurd.  Statement-level procedural languages only cease to grow when
> they cease to be used, and C is now a behemoth too.
>
> This understood, it is still possible to have some sympathy for those
> who confronted the task of 'extending' C to provide support for
> varying-length strings.  The PL/I halfword current-length prefix was
> not available to them, or at least they did not think that it was.
> They chose to use a string of 'conceptually unlimited' length and an
> end-of-string delimiter, nul or  x'00', instead.  The result, never
> perspicuous, proved to be a storage-management nightmare.  Much worse,
> it opened up a Pandora's box of security troubles that will be with us
> for years to come; but it is not clear how else the original design
> deficiency could have been remedied.
>
> I retrospect it is clear that the remedy was worse than the deficiency
> it attempted to make good.  It would have been better to do string
> processing in arrays, as was done in FORTRAN IV; but this was not
> obvious at the time, largely, I suspect, because it was not understood
> just how FORTRAN-like C is.
>
> John Gilmore, Ashland, MA 01721 - USA
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN



-- 
This is a test of the Emergency Broadcast System. If this had been an
actual emergency, do you really think we'd stick around to tell you?

Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to