Writing portable code...

J

jacob navia

There are some people here (let's call them "regulars" for short)
that are always giving lessons to people about how easy is to
write portable code, etc. They always point fingers at you telling you
how bad you write code.

One of them (I would say the prototype of them) is Heathfield.

Here is an exchange that happened just a few hours ago, that
demonstrates my point:

WRITING CODE IS HARD. And regulars aren't better at it than everybody
else...

Ed Jensen wrote
> There are very few regulars here in comp.lang.c that'll admit that
> writing 100% portable C code is non-trivial.

Then, Heathfield answered:
> I'm one of them, however.
> I think it's easy to write *very* portable code, but difficult to write
> 100% portable code. Consider, for example, this simple program:

[code snipped]

Harald van Dijk answered:

And Heathfield had to acknowledge...
 
A

Army1987

There are some people here (let's call them "regulars" for short)
that are always giving lessons to people about how easy is to
write portable code, etc. They always point fingers at you telling you
how bad you write code.

One of them (I would say the prototype of them) is Heathfield.

Here is an exchange that happened just a few hours ago, that
demonstrates my point:

WRITING CODE IS HARD. And regulars aren't better at it than everybody
else...
If you mean that regulars are human, they are, but your statement
with its verbatim meaning is only true for sufficiently small
values of "everybody else" <flame>(e.g. you shouldn't be included
in it) said:
Ed Jensen wrote
There are very few regulars here in comp.lang.c that'll admit that
writing 100% portable C code is non-trivial.

Then, Heathfield answered:
I'm one of them, however.
I think it's easy to write *very* portable code, but difficult to write
100% portable code. Consider, for example, this simple program:

[code snipped]

Harald van Dijk answered:

And Heathfield had to acknowledge...
Oh, stupid stupid stupid (me, not you). You're right, of course. That was unintentional, by the way!
If someone has anything to say about that, they'll answer on that
thread. And your question about C was?
 
M

Malcolm McLean

Army1987 said:
If you mean that regulars are human, they are, but your statement
with its verbatim meaning is only true for sufficiently small
values of "everybody else" <flame>(e.g. you shouldn't be included
in it)</flame>.
A C compiler is quite a difficult piece of software to write. I planned to
write one as a followup to MiniBasic, but shrank from the challenge.
 
R

Richard

jacob navia said:
There are some people here (let's call them "regulars" for short)
that are always giving lessons to people about how easy is to
write portable code, etc. They always point fingers at you telling you
how bad you write code.

One of them (I would say the prototype of them) is Heathfield.

Here is an exchange that happened just a few hours ago, that
demonstrates my point:

WRITING CODE IS HARD. And regulars aren't better at it than everybody
else...

Ed Jensen wrote
There are very few regulars here in comp.lang.c that'll admit that
writing 100% portable C code is non-trivial.

Then, Heathfield answered:
I'm one of them, however.
I think it's easy to write *very* portable code, but difficult to write
100% portable code. Consider, for example, this simple program:

[code snipped]

Harald van Dijk answered:

And Heathfield had to acknowledge...
Oh, stupid stupid stupid (me, not you). You're right, of
course. That was unintentional, by the way!

Was it? Wow. If all of us neglected to make the unintentional mistakes I
fee sure the standards of our code would greatly improve.....
 
S

santosh

Malcolm said:
A C compiler is quite a difficult piece of software to write. I planned to
write one as a followup to MiniBasic, but shrank from the challenge.

Indeed. However jacob has, to my knowledge, written only the machine code
generating and optimising portions of lcc-win32. The front-end is mostly
lcc. But I'm not deprecating his efforts.
 
T

Tor Rustad

jacob said:
There are some people here (let's call them "regulars" for short)
that are always giving lessons to people about how easy is to
write portable code, etc. They always point fingers at you telling you
how bad you write code.

One of them (I would say the prototype of them) is Heathfield.


If I post code, I like to get it corrected. Don't you?

Sometimes, the mistakes are rather uninteresting, typos that would be
detected by a compiler anyway, but in other cases the experts do teach
me something new.

Regulars that post solid code, are a great asset, "anybody" can post a
quote from the standard.


My PB for a clean compile in C, is ca a 1600 liner... that don't mean it
was bug-free.
 
M

Martin Wells

There are some people here (let's call them "regulars" for short)
that are always giving lessons to people about how easy is to
write portable code, etc. They always point fingers at you telling you
how bad you write code.

One of them (I would say the prototype of them) is Heathfield.

I wuda used a word something like apotheosis.

Here is an exchange that happened just a few hours ago, that
demonstrates my point:

WRITING CODE IS HARD. And regulars aren't better at it than everybody
else...


It's piss easy really.

Still preaching about your own incompetence.

Martin
 
K

Kelsey Bjarnason

Indeed. However jacob has, to my knowledge, written only the machine code
generating and optimising portions of lcc-win32. The front-end is mostly
lcc. But I'm not deprecating his efforts.

Frankly, if the generation and optimization portions are any good, that'd
be quite a feat in and of itself.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top