Re: new IL: C (sort of...).
- From: "Rod Pemberton" <do_not_have@xxxxxxxxxxxxx>
- Date: Thu, 11 Jun 2009 20:09:43 -0400
"Marco van de Voort" <marcov@xxxxxxxx> wrote in message
news:slrnh31mqo.ot0.marcov@xxxxxxxxxxxxxxxxxx
On 2009-06-11, Rod Pemberton <do_not_have@xxxxxxxxxxxxx> wrote:very
C has the advantage that it can be implemented for the most part using
However, Cbasic computer science concepts, such as addresses and pointers.
iscan be made far more portable with slight extensions. Examples of this
Objective-C, and OpenStep.
What exactly is C specific in this point, what doesn't go for say Pascal,
Modula-2,Ada etc?
The implementation of arrays and strings and pointers are different. Pascal
is severely lacking in low-level features, and was lacking pointers.
Basically, you're trapped to programming in a limited box that you can't
escape from. I'm not familiar with Modula-2 or Ada. I'm familiar with a
variant of PL/1 which was very Pascal-ish.
- C requires all objects to be at different addresses.
- C requires all C objects to map onto a contiquous sequence of C
characters.
- C implements an "offset operator" which indexes contiguous sequences of C
characters.
- C doesn't implement arrays.
- C does implement an array declaration. That array declaration is
effectively converted into a pointer that can be used with the offset
operator in order to simulate arrays.
- C doesn't implement strings.
- C does simulate "strings", using an all bit-zero character to terminate a
simulated "array"
- etc.
In other words, you only need a contiquous sequence of C characters and an
address, to implement the (non-specialized) features of C, including
"strings" and "arrays". Just due to the way strings are implemented in
Pascal and PL/1 etc., I'd say C fits better with the underlying computing
platform. However, C has numerous other low-level features that most
high-level languages lack. These too add to it's usefulness as an IL.
Rod Pemberton
.
- Follow-Ups:
- Re: new IL: C (sort of...).
- From: Marco van de Voort
- Re: new IL: C (sort of...).
- References:
- RFC: new IL: C (sort of...).
- From: cr88192
- Re: new IL: C (sort of...).
- From: Rod Pemberton
- Re: new IL: C (sort of...).
- From: Rod Pemberton
- Re: new IL: C (sort of...).
- From: Marco van de Voort
- RFC: new IL: C (sort of...).
- Prev by Date: Re: new IL: C (sort of...).
- Next by Date: Re: new IL: C (sort of...).
- Previous by thread: Re: new IL: C (sort of...).
- Next by thread: Re: new IL: C (sort of...).
- Index(es):
Relevant Pages
|