Re: Why C?
- From: Keith Thompson <kst-u@xxxxxxx>
- Date: Wed, 09 Nov 2005 04:21:47 GMT
"Steve" <steve49152@xxxxxxxx> writes:
> Keith Thompson wrote:
[snip]
>> But the number of bits isn't always the most important aspect of a
>> type. If you want to count something, and you know there can't be
>> more than 32767 of them, just use int; if you want to measure the size
>> of something, use size_t.
>
> That's nice. What if I don't like the layer of abstraction chosen for
> the definitions of [numeric] data types?
Then define your own abstraction layer.
[snip]
>> I rarely care what the generated assembly code looks like. I care
>> that the code works the way I intend it to, in accordance with the
>> language specification. Much of the time, I wouldn't be able to read
>> the generated assembly language even if I bothered to examine it.
>
> Yeah, well that's true too. But you must turn off certain
> optimisations when you anticipate examining the assembly language.
> Heavy reliance on macros can also impede the understanding of generated
> code. This is by the by, however. On one level, I am simply of the
> opinion that certain things about the underlying architecture ought to
> be kept in mind while writing code, rather than allowing the
> architecture to impose itself upon the program after the code is
> written and running. Most HLLs seem to insulate the program from the
> world, and hence the programmer as well.
I tend to think of "the world" and the hardware as being at opposite
ends of the <handwaving>something-or-other</handwaving>, with the
programming language being a layer between them. I care about the
visible behavior of my code; I don't care so much about how the
compiler makes that happen.
Your mileage may vary, of course.
--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
.
- Follow-Ups:
- Re: Why C?
- From: Steve
- Re: Why C?
- References:
- Why C?
- From: jacob navia
- Re: Why C?
- From: Skarmander
- Re: Why C?
- From: jacob navia
- Re: Why C?
- From: Skarmander
- Re: Why C?
- From: jacob navia
- Re: Why C?
- From: Keith Thompson
- Re: Why C?
- From: k_over_hbarc
- Re: Why C?
- From: Steve
- Re: Why C?
- From: Steve
- Why C?
- Prev by Date: Re: how to replace a substring in a string using C?
- Next by Date: Re: is possible to build some pointer array?
- Previous by thread: Re: Why C?
- Next by thread: Re: Why C?
- Index(es):
Relevant Pages
|