473,396 Members | 2,009 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

why still use C?

no this is no trollposting and please don't get it wrong but iam very
curious why people still use C instead of other languages especially C++.

i heard people say C++ is slower than C but i can't believe that. in pieces
of the application where speed really matters you can still use "normal"
functions or even static methods which is basically the same.

in C there arent the simplest things present like constants, each struct and
enum have to be prefixed with "struct" and "enum". iam sure there is much
more.

i don't get it why people program in C and faking OOP features(function
pointers in structs..) instead of using C++. are they simply masochists or
is there a logical reason?

i feel C has to benefit against C++.

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk
--
comp.lang.c.moderated - moderation address: cl**@plethora.net
Nov 13 '05
687 22731
Richard Heathfield wrote:
E. Robert Tisdale wrote:

Santa Claus is a troll. Please ignore him.

I think I'll have to disagree with you there. My children have seen Santa
Claus on quite a few occasions (typically in fairytale grotto-like
surroundings), [...]


Well now, that's where they traditionally lurk, isn't it? :-)

Regards, Sidney

Nov 13 '05 #51
On Tue, 07 Oct 2003 06:48:16 GMT, Mike Wahler <mk******@mkwahler.net> wrote:
>
> I don't believe it's possible to implement typical shells in
> straight ANSI C without extensions, so this could be a
> problematic goal.
>
> -Micah
>


Most pipe dreams are "problematic" :-)

I really don't know what you mean by "extensions", although I will read up
on it in the FAQ asap.


"Extensions" are additional nonstandard language constructs
(e.g. keywords, modified versions of standard functions, etc.)
which an implementation might provide for access to platform
specific feature of the host system. C can also be 'extended'
by supplying platform specific libraries with a C implementation,
e.g. the Windows API supplied with compilers for Windows.

-Mike


Doesn't sound like any sort of massive corruption of C to me.

Thanks much.

--
Later, Alan C
You can find my email address at the website: contact.html
take control of your mailbox ----- elrav1 ----- http://tinyurl.com/l55a
Nov 13 '05 #52
Alan Connor <zz****@xxx.yyy> wrote in message news:<Ol***************@newsread3.news.pas.earthli nk.net>...
Greetings to the group. I'm reading the FAQ and K&R and monitoring here,
trying to get a handle on the transition from shell programming to C.

From what I've read, I honestly don't see the need for anything BUT C
and the simple functionality of the high-level programming provided by
any decent shell. (Okay, a teeny weenie bit of assembly language too :-)

Hope I am not out-of-line here.

By-the-way, is there anyplace I can get the entire FAQ as a tarball or
something?


Sometimes i wonder if *nix programmers will ever use anything but c
and shell... (ah, of course they use other languages - but sometimes
it doesn't seemt that way).

You could use C for everything, but the context of the programmer &
the project changes so other languages are consider by some to better
able to express what is required.

An OOPL can be good at describing an application where object
taxonomies make sense, you may need a programmer time 'shortcut' to a
particular thing that general purpose languages would require more
time on, a typical LISP app perhaps, or want trustrable 'built in'
advanced features so as not to rely on re-inventing the wheel or
reusing third party libs - STL for instance. Some particular tools
(e.g. kylix/delphi) are good for more quickly desiging GUI apps. It
all crosses over, a given language's 'unique' qualities are rarely
that unique - you could probably get a shocking amount of versatility
from QuickBasic if you tried hard enough!
Nov 13 '05 #53
On 7 Oct 2003 01:13:12 -0700, gswork <gs****@mailcity.com> wrote:


Alan Connor <zz****@xxx.yyy> wrote in message news:<Ol***************@newsread3.news.pas.earthli nk.net>...
Greetings to the group. I'm reading the FAQ and K&R and monitoring here,
trying to get a handle on the transition from shell programming to C.

From what I've read, I honestly don't see the need for anything BUT C
and the simple functionality of the high-level programming provided by
any decent shell. (Okay, a teeny weenie bit of assembly language too :-)

Hope I am not out-of-line here.

By-the-way, is there anyplace I can get the entire FAQ as a tarball or
something?


Sometimes i wonder if *nix programmers will ever use anything but c
and shell... (ah, of course they use other languages - but sometimes
it doesn't seemt that way).

You could use C for everything, but the context of the programmer &
the project changes so other languages are consider by some to better
able to express what is required.

An OOPL can be good at describing an application where object
taxonomies make sense, you may need a programmer time 'shortcut' to a
particular thing that general purpose languages would require more
time on, a typical LISP app perhaps, or want trustrable 'built in'
advanced features so as not to rely on re-inventing the wheel or
reusing third party libs - STL for instance. Some particular tools
(e.g. kylix/delphi) are good for more quickly desiging GUI apps. It
all crosses over, a given language's 'unique' qualities are rarely
that unique - you could probably get a shocking amount of versatility
from QuickBasic if you tried hard enough!


Well. I think I actually followed most of that.

Just thought it would be cool if all the software on my computer was
in only two languages. Sort of like having the same keybindings on
every app.

As for the object-oriented languages, well, I'm not into the GUI at
all. Graphics yes. Eye-candy and plastic rodents, no.

This post ends with

:wq

:-)

--
Later, Alan C
You can find my email address at the website: contact.html
take control of your mailbox ----- elrav1 ----- http://tinyurl.com/l55a
Nov 13 '05 #54

"Alan Connor" <zz****@xxx.yyy> wrote in message
news:YN***************@newsread3.news.pas.earthlin k.net...
On Tue, 07 Oct 2003 06:48:16 GMT, Mike Wahler <mk******@mkwahler.net> wrote:
>
> I don't believe it's possible to implement typical shells in
> straight ANSI C without extensions, so this could be a
> problematic goal.
>
> -Micah
>

Most pipe dreams are "problematic" :-)

I really don't know what you mean by "extensions", although I will read up on it in the FAQ asap.


"Extensions" are additional nonstandard language constructs
(e.g. keywords, modified versions of standard functions, etc.)
which an implementation might provide for access to platform
specific feature of the host system. C can also be 'extended'
by supplying platform specific libraries with a C implementation,
e.g. the Windows API supplied with compilers for Windows.

-Mike


Doesn't sound like any sort of massive corruption of C to me.


It's not. It cannot be, since it's not part of C. What Micah
is telling you is that some of what is needed in order to implement
a 'typical' shell is not available with only the standard C language,
thus 'extensions' are needed. "Extension" means "addition", not
"corruption".
-Mike

Thanks much.

--
Later, Alan C
You can find my email address at the website: contact.html
take control of your mailbox ----- elrav1 ----- http://tinyurl.com/l55a

Nov 13 '05 #55
"Alan Connor" <zz****@xxx.yyy> wrote in message
news:Ff****************@newsread3.news.pas.earthli nk.net...

Well. I think I actually followed most of that.

Just thought it would be cool if all the software on my computer was
in only two languages.


All of it is in *one* language. The instruction set of the
processor (unless you have some weird multiprocessor machine
and one or more of the processors use(s) a different instruction
set from the other(s) )

Take away the source code for all the programs, and the software
is still there.

-Mike


Nov 13 '05 #56
In <Jg****************@newsread3.news.pas.earthlink.n et> "Mike Wahler" <mk******@mkwahler.net> writes:
"Alan Connor" <zz****@xxx.yyy> wrote in message
news:Ff****************@newsread3.news.pas.earthl ink.net...

Well. I think I actually followed most of that.

Just thought it would be cool if all the software on my computer was
in only two languages.


All of it is in *one* language. The instruction set of the
processor (unless you have some weird multiprocessor machine
and one or more of the processors use(s) a different instruction
set from the other(s) )

Take away the source code for all the programs, and the software
is still there.


That's valid for compiled languages only. Doesn't work for interpreted
languages, where you're left with nothing after removing the source code.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 13 '05 #57
On Tue, 07 Oct 2003 10:08:41 GMT, Mike Wahler <mk******@mkwahler.net> wrote:


"Alan Connor" <zz****@xxx.yyy> wrote in message
news:Ff****************@newsread3.news.pas.earthli nk.net...

Well. I think I actually followed most of that.

Just thought it would be cool if all the software on my computer was
in only two languages.


All of it is in *one* language. The instruction set of the
processor (unless you have some weird multiprocessor machine
and one or more of the processors use(s) a different instruction
set from the other(s) )

Take away the source code for all the programs, and the software
is still there.

-Mike


I was speaking in practical terms. No one is going to be entering machine
language at the prompt to copy a file.

--
Later, Alan C
You can find my email address at the website: contact.html
take control of your mailbox ----- elrav1 ----- http://tinyurl.com/l55a
Nov 13 '05 #58

"Alan Connor" <zz****@xxx.yyy> wrote in message
news:np****************@newsread3.news.pas.earthli nk.net...
On Tue, 07 Oct 2003 10:08:41 GMT, Mike Wahler <mk******@mkwahler.net>

wrote:


"Alan Connor" <zz****@xxx.yyy> wrote in message
news:Ff****************@newsread3.news.pas.earthli nk.net...

Well. I think I actually followed most of that.

Just thought it would be cool if all the software on my computer was
in only two languages.


All of it is in *one* language. The instruction set of the
processor (unless you have some weird multiprocessor machine
and one or more of the processors use(s) a different instruction
set from the other(s) )

Take away the source code for all the programs, and the software
is still there.

-Mike


I was speaking in practical terms. No one is going to be entering machine
language at the prompt to copy a file.


First, a 'prompt' will not typically accept machine language,
but interpret mnemonic 'commands' which are submitted to and
acted upon by the provider of such a prompt (typically
an operating system).
Dan has already pointed out my oversight regarding interpreted
languages. But aside from that, I still stand by what I said.

I don't need to type in, e.g. printf("Hello") etc. to run a
compiled C program.

-Mike

Nov 13 '05 #59
Alan Connor <zz****@xxx.yyy> wrote in message news:<Ol***************@newsread3.news.pas.earthli nk.net>...
Greetings to the group. I'm reading the FAQ and K&R and monitoring here,
trying to get a handle on the transition from shell programming to C.

From what I've read, I honestly don't see the need for anything BUT C
and the simple functionality of the high-level programming provided by
any decent shell. (Okay, a teeny weenie bit of assembly language too :-)


No one language is universally best at everything. There are tasks
for which C is not the best choice. It would not be my first choice
for a graphical client, for example.
Nov 13 '05 #60
On Tue, 07 Oct 2003 17:58:21 GMT, Mike Wahler <mk******@mkwahler.net> wrote:

"Alan Connor" <zz****@xxx.yyy> wrote in message
news:np****************@newsread3.news.pas.earthli nk.net...
On Tue, 07 Oct 2003 10:08:41 GMT, Mike Wahler <mk******@mkwahler.net>

wrote:
>
>
> "Alan Connor" <zz****@xxx.yyy> wrote in message
> news:Ff****************@newsread3.news.pas.earthli nk.net...
>>
>> Well. I think I actually followed most of that.
>>
>> Just thought it would be cool if all the software on my computer was
>> in only two languages.
>
> All of it is in *one* language. The instruction set of the
> processor (unless you have some weird multiprocessor machine
> and one or more of the processors use(s) a different instruction
> set from the other(s) )
>
> Take away the source code for all the programs, and the software
> is still there.
>
> -Mike
>
>
>
>


I was speaking in practical terms. No one is going to be entering machine
language at the prompt to copy a file.


First, a 'prompt' will not typically accept machine language,
but interpret mnemonic 'commands' which are submitted to and
acted upon by the provider of such a prompt (typically
an operating system).
Dan has already pointed out my oversight regarding interpreted
languages. But aside from that, I still stand by what I said.

I don't need to type in, e.g. printf("Hello") etc. to run a
compiled C program.

-Mike


You lost me, Mike, and a ways back, I think.

--
Later, Alan C
You can find my email address at the website: contact.html
take control of your mailbox ----- elrav1 ----- http://tinyurl.com/l55a
Nov 13 '05 #61
On 7 Oct 2003 11:12:39 -0700, John Bode <jo*******@my-deja.com> wrote:


Alan Connor <zz****@xxx.yyy> wrote in message news:<Ol***************@newsread3.news.pas.earthli nk.net>...
Greetings to the group. I'm reading the FAQ and K&R and monitoring here,
trying to get a handle on the transition from shell programming to C.

From what I've read, I honestly don't see the need for anything BUT C
and the simple functionality of the high-level programming provided by
any decent shell. (Okay, a teeny weenie bit of assembly language too :-)


No one language is universally best at everything. There are tasks
for which C is not the best choice. It would not be my first choice
for a graphical client, for example.


Well this will work out well then, because I am not into the GUI at all.

--
Later, Alan C
You can find my email address at the website: contact.html
take control of your mailbox ----- elrav1 ----- http://tinyurl.com/l55a
Nov 13 '05 #62

"Alan Connor" <zz****@xxx.yyy> wrote in message
news:ED****************@newsread3.news.pas.earthli nk.net...
On Tue, 07 Oct 2003 17:58:21 GMT, Mike Wahler <mk******@mkwahler.net> wrote:

"Alan Connor" <zz****@xxx.yyy> wrote in message
news:np****************@newsread3.news.pas.earthli nk.net...
On Tue, 07 Oct 2003 10:08:41 GMT, Mike Wahler <mk******@mkwahler.net>

wrote:
>
>
> "Alan Connor" <zz****@xxx.yyy> wrote in message
> news:Ff****************@newsread3.news.pas.earthli nk.net...
>>
>> Well. I think I actually followed most of that.
>>
>> Just thought it would be cool if all the software on my computer was
>> in only two languages.
>
> All of it is in *one* language. The instruction set of the
> processor (unless you have some weird multiprocessor machine
> and one or more of the processors use(s) a different instruction
> set from the other(s) )
>
> Take away the source code for all the programs, and the software
> is still there.
>
> -Mike
>
>
>
>

I was speaking in practical terms. No one is going to be entering machine language at the prompt to copy a file.


First, a 'prompt' will not typically accept machine language,
but interpret mnemonic 'commands' which are submitted to and
acted upon by the provider of such a prompt (typically
an operating system).
Dan has already pointed out my oversight regarding interpreted
languages. But aside from that, I still stand by what I said.

I don't need to type in, e.g. printf("Hello") etc. to run a
compiled C program.

-Mike


You lost me, Mike, and a ways back, I think.


Doesn't really matter, since we're not talking about C anymore
anyway. :-) I'll try again: I'm saying that with a compiled language
such as C, once the program has been translated into executable
form, the source text is unnecessary for it to be executed.
Contrast an "interpreted" language, where the source is parsed
every time it's run. I suspect the "runtime" of the interpreter
is what you're referring to with "prompt", where I jumped to
the conclusion that you meant "operating system's command prompt".
Sorry for any confusion.

-Mike

--
Later, Alan C
You can find my email address at the website: contact.html
take control of your mailbox ----- elrav1 ----- http://tinyurl.com/l55a

Nov 13 '05 #63

"Alan Connor" <zz****@xxx.yyy> wrote in message
news:ED****************@newsread3.news.pas.earthli nk.net...
On 7 Oct 2003 11:12:39 -0700, John Bode <jo*******@my-deja.com> wrote:


Alan Connor <zz****@xxx.yyy> wrote in message news:<Ol***************@newsread3.news.pas.earthli nk.net>...
Greetings to the group. I'm reading the FAQ and K&R and monitoring here, trying to get a handle on the transition from shell programming to C.

From what I've read, I honestly don't see the need for anything BUT C
and the simple functionality of the high-level programming provided by
any decent shell. (Okay, a teeny weenie bit of assembly language too :-)


No one language is universally best at everything. There are tasks
for which C is not the best choice. It would not be my first choice
for a graphical client, for example.


Well this will work out well then, because I am not into the GUI at all.


"GUI" is not the only thing that C is not best suited for, it's
only of of them. E.g. text parsing *can* be done with C, but
many feel that something like Perl is more suited to it. Darn
near "anything" can be done with C (which imo is a big reason
for its popularity), but many tasks are more quickly and "easily"
done with some other language(s). YMMV.

We're just advising you to not limit yourself to one or two
tools. Get out to the hardware store and fill up that toolbox. :-)

-Mike
Nov 13 '05 #64
On Tue, 07 Oct 2003 20:37:05 GMT, Mike Wahler <mk******@mkwahler.net> wrote:

You lost me, Mike, and a ways back, I think.
Doesn't really matter, since we're not talking about C anymore
anyway. :-) I'll try again: I'm saying that with a compiled language
such as C, once the program has been translated into executable
form, the source text is unnecessary for it to be executed.
Contrast an "interpreted" language, where the source is parsed
every time it's run. I suspect the "runtime" of the interpreter
is what you're referring to with "prompt", where I jumped to
the conclusion that you meant "operating system's command prompt".
Sorry for any confusion.

-Mike

Okay, let me ask you this:

Would it be practical to run an entire OS (or the vast bulk of it) with
an interpreted language?
-------------------------------------------------------------------------
"Alan Connor" <zz****@xxx.yyy> wrote in message
news:ED****************@newsread3.news.pas.earthli nk.net... On 7 Oct 2003 11:12:39 -0700, John Bode <jo*******@my-deja.com> wrote:

Well this will work out well then, because I am not into the GUI at all.


"GUI" is not the only thing that C is not best suited for, it's
only of of them. E.g. text parsing *can* be done with C, but
many feel that something like Perl is more suited to it. Darn
near "anything" can be done with C (which imo is a big reason
for its popularity), but many tasks are more quickly and "easily"
done with some other language(s). YMMV.

(I prefer sed and other utilities and the shell for text editing,
and would learn AWK before Perl, any day.)
We're just advising you to not limit yourself to one or two
tools. Get out to the hardware store and fill up that toolbox. :-)

-Mike

One step at a time, Mike, although there is no disputing the wholesomeness
of that advice.

But I may decide to use only C and Sh. :-)

--
Later, Alan C
You can find my email address at the website: contact.html
take control of your mailbox ----- elrav1 ----- http://tinyurl.com/l55a
Nov 13 '05 #65
gswork wrote in article <81**************************@posting.google.com >:
Sometimes i wonder if *nix programmers will ever use anything but c
and shell... (ah, of course they use other languages - but sometimes
it doesn't seemt that way).


Shell? Blech. I see most *nix programming moving towards Perl and Python,
with Python being my favorite of the two. Heavy text parsing is better
under Perl, but Python to me is far more versatile. Perl is just like
shell on steroids anyway.
--
Todd Stephens
ICQ# 3150790
"A witty saying proves nothing." -Voltaire
Nov 13 '05 #66
SKH
On Tue, 07 Oct 2003 21:35:00 +0000, Todd Stephens wrote:
Perl is just like shell on steroids anyway.


And a cryptic one, at that. I can't wait for it to fade a way, replaced
by more sensible tools.
Nov 13 '05 #67
"Alan Connor" <zz****@xxx.yyy> wrote in message
news:h6***************@newsread4.news.pas.earthlin k.net...
Sorry for any confusion.

-Mike


Okay, let me ask you this:

Would it be practical to run an entire OS (or the vast bulk of it) with
an interpreted language?


We're really way off topic now. I've sent you an email.

-Mike
Nov 13 '05 #68
On Tue, 07 Oct 2003 22:37:28 GMT, SKH <sk*@yoyodyne.net> wrote:


On Tue, 07 Oct 2003 21:35:00 +0000, Todd Stephens wrote:
Perl is just like shell on steroids anyway.


And a cryptic one, at that. I can't wait for it to fade a way, replaced
by more sensible tools.


Or at least offer itself as a complete *substitute* for the shell.

--
Later, Alan C
You can find my email address at the website: contact.html
take control of your mailbox ----- elrav1 ----- http://tinyurl.com/l55a
Nov 13 '05 #69
On Tue, 07 Oct 2003 23:41:03 GMT, Mike Wahler <mk******@mkwahler.net> wrote:
We're really way off topic now. I've sent you an email.

-Mike


You are passlisted....NOW :-)

--
Later, Alan C
You can find my email address at the website: contact.html
take control of your mailbox ----- elrav1 ----- http://tinyurl.com/l55a
Nov 13 '05 #70
Alan Connor wrote in article
<X0*****************@newsread3.news.pas.earthlink. net>:
Or at least offer itself as a complete substitute for the shell.


Now there's a thought. I wonder how far off a Perl shell is. With syntax
that makes tcsh look like QBasic.

--
Todd Stephens
ICQ# 3150790
"A witty saying proves nothing." -Voltaire
Nov 13 '05 #71
Alan Connor <zz****@xxx.yyy> wrote in message news:<h6***************@newsread4.news.pas.earthli nk.net>...

Would it be practical to run an entire OS (or the vast bulk of it) with
an interpreted language?


Although Java is not an operating system per se, it could possibly
come close.

Also, languages like Forth (which is an operating system in its own
right) sit somewhere between 'compiled' and 'interpreted'.

--
Peter
Nov 13 '05 #72
"Alan Connor" <zz****@xxx.yyy> wrote in message
news:_0****************@newsread3.news.pas.earthli nk.net...
On Tue, 07 Oct 2003 23:41:03 GMT, Mike Wahler <mk******@mkwahler.net>

wrote:
We're really way off topic now. I've sent you an email.

-Mike


You are passlisted....NOW :-)


"passlisted?" I'm not familiar with that term.

-Mike
Nov 13 '05 #73
> > i heard people say C++ is slower than C but i can't believe that. in
pieces

What people? What are their qualifications to make such a statement?
What evidence have they provided to prove the statement?

And what are your qualifications to refute such a statement? What
evidence do you have to disprove it?
i see you have very much problems with people who are criticize your
favourite programming language.
when you have a problem with that nobody forces you to discuss here with us.
Obviously your knowledge of C is minimal.
what makes you believe that?
Do you think ignorance of a
subject qualifies you to expound on it? Or is your wisdom to be
inferred by your lack of proper capitalization, punctuation, and
grammar?
dont be childish. i didn't troll so you shouldn't do this either.
when you feel my grammar or punktuation are wrong please point out the
passage and tell my what was wrong.
i'm german and my english is still not perfect.
Why should we care about your obviously illogical feelings?
prove that my thaughts are illogical.
C existed
long before C++ did, and is and was extremely successful.
the same is true for forth,fortran,cobol,pl/1 but does that mean it is
reasonable
to use these languages today?
It is the
most portable programming language in the world.
that is a fact i already learned in this discussion. and your first
argument.
It does not need to
justify its existence to you or to anyone else, nor does it have to
compare itself to any other language.
what is wrong with comparing languages?

Discussions of the relative merits of various programming languages
belong in news:comp.programming if they are cogent. They belong in
advocacy groups if not. No one is asking you to use C is you don't
think it is useful to you.

But comparisons between C and any other language, C++ included, are
not C language issues and do not belong in any of groups you posted
to.


--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk
--
comp.lang.c.moderated - moderation address: cl**@plethora.net
Nov 13 '05 #74
> > pieces of the application where speed really matters you can still use
"normal" functions or even static methods which is basically the same.
Suck it and see.


?
int main(void)
{
const int new = 6; /* I rest my case */
return 0;
}
i though in standard C, there isn't such a thing like "const" you can only
use macros to fake them.
each struct
and enum have to be prefixed with "struct" and "enum".
Poor baby.


void foo(struct MyStruct struct){}

in C you cannot omit the keyword "struct". when it compiles without "struct"
you probably using a C++ compiler.

Yes, there is. C is simple,
agreed.
portable,
agreed.
and very very fast. Those are important qualities.
not faster than C++. why should it?
but note that C++ is /not/ available on anything like as many
target platforms as C is.


that is true.

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk
--
comp.lang.c.moderated - moderation address: cl**@plethora.net
Nov 13 '05 #75
In article <cl****************@plethora.net>, cody
<NO****************@gmx.net> writes
no this is no trollposting and please don't get it wrong but iam very
curious why people still use C instead of other languages especially C++.
C++ doesn't fit on to many targets.
i don't get it why people program in C and faking OOP features(function
pointers in structs..) instead of using C++.
I don't understand either...
are they simply masochists


probably.
C is good for Modular programming. In many ways there is little to
choose between modular and OO programming.

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/\
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
--
comp.lang.c.moderated - moderation address: cl**@plethora.net
Nov 13 '05 #76
> There is both a speed and size penalty for using C++ where
pain C would do. The penalty isn't as bad as it used to be.
there should be no difference between the calls of

class A{ public: static void a(){ } }

and

void a(){}
C has constants. We usually use typedefs rather than struct
and enum tags.


is "const float PI=3.14" possible in plain C?

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk
--
comp.lang.c.moderated - moderation address: cl**@plethora.net
Nov 13 '05 #77
> C is available on nearly every machine. C++ is not. OOP is a nice thing
but not for everything.

"With OOP we can solve problems very elegant, we wouldn't have without
it."

While the above statement is not entirely true, there is some truth in it.
;)

agreed :)

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk
--
comp.lang.c.moderated - moderation address: cl**@plethora.net
Nov 13 '05 #78
> > i don't get it why people program in C and faking OOP features(function
pointers in structs..) instead of using C++.


This is laughable. It is C++ that is best known for faking OO features!
If you're looking for an OO extension to C that is actually well done,
one that is additionally a proper superset of C, you should be looking
at Objective-C. But that's still in the C family. If you don't want C,
don't use C; don't use C++ and pretend you're not using C, though.

so why is objective C used my nobody? except you maybe :)

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk
--
comp.lang.c.moderated - moderation address: cl**@plethora.net
Nov 13 '05 #79
> C supports the const keyword now.

since when? C99?
each struct and enum must be prefixed with "struct" and "enum".


typedef struct X {
// public data members
} X;

in C is the same as

struct X {
// public data members
};

in C++.


and in function declarations? is void foo(X x){} allowed?

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk
--
comp.lang.c.moderated - moderation address: cl**@plethora.net
Nov 13 '05 #80
In article <cl****************@plethora.net>,
"cody" <NO****************@gmx.net> wrote:
no this is no trollposting and please don't get it wrong but iam very
curious why people still use C instead of other languages especially C++.


Because there is an ANSI/ISO C compiler for my Apple IIgs and there
isn't a compiler for C++. Not all of us program for the x86 platform. I
prefer the WDC65C816.
--
comp.lang.c.moderated - moderation address: cl**@plethora.net
Nov 13 '05 #81
On 05 Oct 2003 21:37:06 GMT
"cody" <NO****************@gmx.net> wrote:
no this is no trollposting and please don't get it wrong but iam very
curious why people still use C instead of other languages especially
C++.

I'd just like to add my 2 $.025.
C++ is a very tool rich language and is wonderful for application level
and some systems level jobs. C is excellent for many lower level
programming jobs. I would certainly use C++ for graphical programming
and any other type of programming where one should deal with objects.

It all comes under the heading of "use the right tool for the job". When
comparing C to C+ I think of C as assembler language and C++ as the high
level language, and there are some tasks where assembler language is
appropriate.

--
Jerry Feldman <gaf-nospam-at-blu.org>
Boston Linux and Unix user group
http://www.blu.org PGP key id:C5061EA9
PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
--
comp.lang.c.moderated - moderation address: cl**@plethora.net
Nov 13 '05 #82
Speaking for myself and no one else...

"cody" <NO****************@gmx.net> wrote in message news:<cl****************@plethora.net>...
no this is no trollposting and please don't get it wrong but iam very
curious why people still use C instead of other languages especially C++.


Main reasons:

1. It's required. I'm supporting code that, for one reason or
another, was originally written in C, and porting it to C++ or
anything else is far more effort than it's worth.

2. C is a smaller language than C++, and learning to use it
effectively is a bit more straightforward than learning to use C++
effectively. Once you actually understand OOP, C++ pretty much falls
into place, but IME there's a longer flailing period with C++ (YMMV).
--
comp.lang.c.moderated - moderation address: cl**@plethora.net
Nov 13 '05 #83
"cody" <NO****************@gmx.net> wrote in message news:<cl****************@plethora.net>...
no this is no trollposting and please don't get it wrong but iam very
curious why people still use C instead of other languages especially C++.
For small portable utilities it really is rather good, for larger
projects it can get a little confusing if you don't set about things
well. C++ can be nice there - but then you have to watch what you're
doing as it can be a minefield.

C Compilers are plentiful and often very good, ISO C is portable and
widely implemented, there's lots of third party libraries (though that
can be confusing!).

You can structure your C code so as to be efficient for the machine -
not what you're always 'supposed' to do, but it's an option. Many C
compilers are capable of significant optimisation too.

C++ and it's STL are a nice way to accomplish many things too though,
nothing you couldn't do it C, but sometimes clearer and less
troublesome (for me as someone of relatively low skill in both!)

And then there's code size, embedded apps....
i heard people say C++ is slower than C but i can't believe that.


intuitively i'd imagine all the safety nets might slow some parts
down, other than that i suspect there's no meaningful difference.
--
comp.lang.c.moderated - moderation address: cl**@plethora.net
Nov 13 '05 #84
thp
In comp.std.c cody <NO****************@gmx.net> wrote:
+ no this is no trollposting and please don't get it wrong but iam very
+ curious why people still use C instead of other languages especially C++.
+
+ i heard people say C++ is slower than C but i can't believe that. in pieces
+ of the application where speed really matters you can still use "normal"
+ functions or even static methods which is basically the same.
+
+ in C there arent the simplest things present like constants, each struct and
+ enum have to be prefixed with "struct" and "enum". iam sure there is much
+ more.
+
+ i don't get it why people program in C and faking OOP features(function
+ pointers in structs..) instead of using C++. are they simply masochists or
+ is there a logical reason?
+
+ i feel C has to benefit against C++.

C is pretty much, but not quite, a sublanguage of C++. C programmers
who don't use the non-C++ features of C are programming in C++ whether
they claim to or not. They are restricting themselves to an older,
more established, more easily learned, and more easily implemented
subset of C++. But they are writing in C++ --- non-idiomatic C++, but
C++ nevertheless. AFAIK, a C++ compile is free to generate the same
code for those programs as would a C compiler, so there is no
intrinsic difference in performance.

Compiling C programs with a C++ compiler has the benefit that C++
compilers are required to perform intermodule type checking. But I'm
told that this intermodule type checking is a curse when one tries to
use precompiled libraries that have been compiled on different C++
compilers, since that checking is usually based on name-mangling and
there is no name-mangling standard. (Perhaps others have more
experience with that issue.)

Tom Payne
--
comp.lang.c.moderated - moderation address: cl**@plethora.net
Nov 13 '05 #85
"Mike Wahler" <mk******@mkwahler.net> writes:
"Alan Connor" <zz****@xxx.yyy> wrote in message
news:_0****************@newsread3.news.pas.earthli nk.net...
On Tue, 07 Oct 2003 23:41:03 GMT, Mike Wahler <mk******@mkwahler.net>

wrote:
We're really way off topic now. I've sent you an email.

-Mike


You are passlisted....NOW :-)


"passlisted?" I'm not familiar with that term.


Possibly... added to the list of people allowed to pass through
his not-a-spammer?-then-confirm-yourself filter...?

-Micah
Nov 13 '05 #86
Todd Stephens <Hu*****@Huzzah.com> writes:
Alan Connor wrote in article
<X0*****************@newsread3.news.pas.earthlink. net>:
Or at least offer itself as a complete substitute for the shell.


Now there's a thought. I wonder how far off a Perl shell is.


A Perl shell has been in existence for some time now.

http://www.gregorpurdy.com/gregor/psh/

-Micah
Nov 13 '05 #87
In <cl****************@plethora.net> "cody" <do*********************@gmx.de> writes:
is "const float PI=3.14" possible in plain C?


If you're not aware of the basic standard C features, what makes you
think that you're qualified to participate to this discusion?

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 13 '05 #88
In <cl****************@plethora.net> "cody" <do*********************@gmx.de> writes:
C supports the const keyword now.


since when? C99?


Since C89.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 13 '05 #89
"cody" <do*********************@gmx.de> wrote in message
news:cl****************@plethora.net...

Attribution restored:

"Jack Klein" <ja*******@spamcop.net> wrote in message
news:cl****************@plethora.net...
Cody:

First, I will initially take at face value your statement
that you are not trolling. Let's see what happens after
you read the following:

I'm writing this because you probably do not realize
that Mr. Klein is one of the select few people here
who are the most highly qualified to help people to
learn and work with with the C language, as well as
to explain its various strengths and weaknesses, and
to help you decide if C is the most appropriate tool
for a particular task.

Strictly speaking, only discussion of the language itself
is topical here, but if treated with respect, I suspect
Jack would probably extend his aid regarding those last
two issues as well.

Of the people who have replied to you, I consider Jack
and Richard Heathfield to be very far "above the crowd"
with regard to knowledge and skill with the C language.
I suspect most others here will agree.

If you want quality help and information about C, you
can hardly do better than to listen to these two gentlemen.

Let's review. See below.
On 05 Oct 2003 21:37:06 GMT, "cody" <NO****************@gmx.net> wrote
in comp.std.c:
i heard people say C++ is slower than C but i can't believe that. in pieces

What people? What are their qualifications to make such a statement?
What evidence have they provided to prove the statement?

And what are your qualifications to refute such a statement? What
evidence do you have to disprove it?


i see you have very much problems


I fail to see Jack expressing any "problems" in what he wrote
above. He asked legitimate questions about the statements
you made. He did not attack you, insult you, or call you
bad names. Nor did he shower you with love and praise.

His questions were neutral, and in my opinion designed
to cause you to stop and think. He can only answer to
what you wrote, because as far as I know, he cannot read
minds, and I know from experience here that he will not
simply assume meanings or motives you did not express.

So when you say:
i see you have very much problems
I can only answer: How do you know he has problems?

and:
with people who are criticize
I answer: Assuming for the moment that he does "have
a problem with your criticism," how can you know whether
or not he "has problems with people who criticize?"
Do you claim knowledge of his interactions with everyone?

and:
your favourite programming language.
I answer: How can you know if C is or is not his
favorite language?
when you have a problem with that nobody forces you to discuss here with us.
Obviously your knowledge of C is minimal.


what makes you believe that?


Probably the part of your post to which it responded,
which you did quote, but I reproduce here:
in pieces of the application where speed really matters
you can still use "normal" functions or even static methods
which is basically the same.

in C there arent the simplest things present like constants,
each struct and enum have to be prefixed with "struct" and
"enum". iam sure there is much
more.
Jack replied as he did because he *knows* that:

1. C does not assign an attribute of "normal" or "abnormal"
to functions.

2. C does not define anything called a "static method" or a
"method".

3. A function can indeed be declared as "static", but this
attribute is not defined to have any effect at all upon
performance.

4. The qualities of a nonstatic function are *not* the same
as those of a static function. Where applied to a function,
the "static" keyword causes its scope and linkage to differ
from one where it is not.

5. Nothing at all about speed of performance is specified
by the C language.

6. C does indeed specify a keyword 'const' and its effect
when applied. A constant can also be expressed with a
macro.

7. structure object types are defined using the 'struct' keyword
and enumeration types are defined using the 'enum' keyword.
Your sole implied reason for expressing dissatisfaction with
these syntactical rules is that they differ from that of
another language. C is not C++, nor does it make any attempt
to be.

You make six erroneous assertions or implications about C,
and also complain that C is not C++. Then you say "I'm sure
there is much more."

It is not clear to me whether you mean "much more" about
C which you do not know, or "much more" about C you do
not like. More which you do not know, I would hesitate
to deny, given the several false statements you made.
More which you do not like, I do not doubt at all. That
last is your opinion, not a fact which can be refuted or
denied, so it doesn't matter what anyone thinks about that.
You repeated statements said by others and gave your
judgement about them. You gave no bases for such a
judgment. So Jack asked for your premises. You responded
by attacking him. Then you make or imply assertions
of your own, again providing no premises for them.

Do you think ignorance of a
subject qualifies you to expound on it?
Another logical question, again probably designed to
cause to to stop and think about what you wrote.
No personal attacks. (Despite the belief to the
contrary by many, ignorance is not a character flaw,
it's simply a lack of education about one or more
subjects, easily rectified, and without any reason
for shame or embarrassment.)

Jack is extremely qualified to assess one's knowledge
or ignorance about the C language. He has accurately
assessed yours, and validly challenges your criticism
of it. (Actually he didn't need that reason anyway,
since this group is *specifically designated* for
*discussion* of C, not for advocacy or criticism of it.)

I believe I have reasonable knowledge of C, but not
perfect, and sometimes I write something here about C
which is wrong. When Jack sees this he corrects me.
I respond with *thanks*, not by attacking him for
pointing out my errors.
Or is your wisdom to be
inferred by your lack of proper capitalization, punctuation, and
grammar?

Perhaps this remark is justified, perhaps not. It seems
that your irrefutable ignorance about C, combined with
your expression of conclusions without premises might
have caused him to associate your nonfluency with English
with your level of wisdom.

I can understand this reaction, since when you wrote your
first post, (in this English-speaking newsgroup), you did not
indicate that English is not your native language, and
unfortunately, a significant number of people whose native
language *is* English post here with spelling, grammar,
etc. far worse than yours.

The content of your post combined with the poor English
probably caused him to believe you were an American
or British troll.
dont be childish.
Jack is certainly not childish. My many years of interaction
with him here tell me this. How long have *you* been here?
i didn't troll so you shouldn't do this either.
Despite your disclaimer, your message gives every evidence
of being a troll. For now, I give you the benefit of the
doubt. Jack is certainly no troll, but once of the more
highly regarded and valued regular contributors here.

I suppose time will tell what your true character is.
when you feel my grammar or punktuation are wrong please point out the
passage and tell my what was wrong.
If you ask nicely, perhaps I'll do that for you.
Perhaps you might help me learn German. But not
here. Maybe in newsgroups about English and German.

Here, only C.
i'm german and my english is still not perfect.
I understand very little German, but my few halfhearted
attempts to learn it quickly informed me that many more
words are capitalized in German than in English; it seems
that every noun is capitalized (only my impression, I'm
not certain.) If your defense of your English is that
you're German, I would have expected too many capital
letters, not none at all. :-)

My brief 'learning' experiences with German also indicates
that it uses punctuation as well. Is it true that the
only punctuation characters used consistently are periods
and apostrophes, and that commas are optional, as your
messages seem to show? Is it true that sentences are begun
in lower case?

I do see two indicators of a German learning English:
the British English spelling which uses 'ou' where the
American English uses only 'o' (meaning you probably
have more contact with British than Americans), and the
use of 'k' where all forms of English use 'c', 'k', or
'ck'.

[Restoring context for below]:
i don't get it why people program in C
There is no single reason or set of reasons. The reasons
of some can and do differ from those of others. The
only way to know is to ask each person using C.

Why do you seem to believe that if a person uses C, that
that is the only language he uses? The average programmer
I come into contact with uses between three and six programming
languages on a regular basis. I'm acquainted with a few who
use only one, and others who use a dozen or more, but these
are the exceptions in my experience.
and faking OOP
features (function pointers in structs..)
1. Why do you seem to feel that OOP is the solution to
all programming issues? Have you blindly believed
the 'mass media'?

2. OOP can be done in virtually any language. Why do
you feel that using a given language's available features
to implement OOP is somehow 'fake'?

3. Why do you believe that the insertion of a pointer to
a function into a structure causes the use of that
structure and its function pointer member(s) to become
a component of OOP or OOP itself?

4. Are you unaware of the several other concepts and
techniques which comprise OOP?
instead of
using C++.
Why do you believe that C++ is the only language which
has features and constructs which directly support OOP?
are they simply masochists
I doubt it. More likely they're rational, logical people
applying appropriate tool(s) to particular task(s) And
personally, I find C a joy to use. I feel the same way
about C++.

I embrace *both* languages, I don't pit them against
one another. Sometimes I combine the two, drawing upon
the strengths of each and/or overcoming limitations of
each, to create useful applications.

You probably have a tool box in your garage. What's
inside? Just a hammer? Just a screwdriver? I suspect
it contains a variety of useful tools. This concept
does not disappear in the programming world.
or is there a
logical reason?
I suspect there are many. But I won't presume to present the
reasons of others. I've told you mine.
i feel C has to benefit against C++.


I'll guess you've made a typing error here and really
meant:

"i feel C has no benefit against C++."

You're certainly entitled to that opinion. Nobody
has tried to force you to use C and/or to refrain
from using C++, have they? So your expression of
this "feeling" here will garner no sympathy or support.
All we can tell you is to use any language you like.
Why should we care about your obviously illogical feelings?
prove that my thaughts are illogical.


I believe I've done that above. I've done this with the
intention of helping you. I'm curious as to how you will
react.
C existed
long before C++ did, and is and was extremely successful.
the same is true for forth,fortran,cobol,pl/1 but does that mean it is
reasonable
to use these languages today?


That question implies that you've decided it means it is not.
But you've just agreed that the same (age, past and current
success) is true for those languages. It seems you've
just contradicted yourself, as well as made another conclusion
without premises. Does age somehow override success?

Are you saying that when a programming language reaches a
certain age it becomes obsolete or 'unreasonable to use'?
Why? Have you never considered the *domain* of a particular
language? Are you unaware of the concept of "existing code
base?" Simple economics?

I've used all of the languages you cite during my career
except Forth, and many more. I use and like C++ very
much. But I don't use it as a basis to criticize C or
any other language. I'm uncertain about PL/1, but I *know*
that FORTRAN and COBOL are still widely used today. I don't
know if it's still true today, but not very long ago, COBOL
represented the vast majority of existing code. Much, perhaps
most of it is still being used without complaint or problem.

Would you have people throw away perfectly good code
which *already performs its task satisfactorily*
and write it all over again from scratch? Expend the
resources for design alterations often necessary when
moving to a new language? For testing and debugging?
For the extra hardware probably required for the necessary
"run in parallel" period? In a pointless, misguided quest
to be "modern?"

What about systems for which a C++ implementation is
not available? For which only an implementation of
a single language (C for example) is available?
What about the fact that among these single-language-
available systems, the language with the highest
probability of being that single one is C?

Also, why would people expend the effort to continue to
update COBOL and FORTRAN standards if nobody found them
'reasonable' to use? Or did you assume that these languages,
which you label by implication "ancient, obsolete, useless",
were abandoned by everyone in favor of languages like C++,
simply because they're more recently invented?

Are you suffering from the misconception that any given
single language is or can be the solution to all programming
issues?

Jack's remark about the age of C was meant to show that
it has withstood the "test of time", and is still a very
useful and powerful tool. In my opinion, the same is
true of FORTRAN and COBOL, and I suspect will also be
of C++ (which imo has alredy proven its power, we'll
still be in the "time test" period for a while yet).
It is the
most portable programming language in the world.


that is a fact i already learned in this discussion. and your first
argument.


Jack has successfully refuted much of what you've stated.
It would be in your best interest to listen to him if
you care to learn what C really is. Even if you find
his mode of communication not to your absolute satisfaction,
you could learn much from him. I certainly have.

If you want to discuss or learn about C, this is the place.
If you want to criticize it or compare it with other languages,
this is not the place.
It does not need to
justify its existence to you or to anyone else,

This is a key point.
nor does it have to
compare itself to any other language.


what is wrong with comparing languages?


Doing it here is wrong because it's not topical here.

Doing it in proper context could indeed be a fruitful
exercise. But before you do, I strongly suggest you
base your side of a debate upon accurate knowledge,
and to the extent possible, experience, not hearsay
and speculation.
There. I feel better now. :-)

-Mike

Nov 13 '05 #90
"Micah Cowan" <mi***@cowan.name> wrote in message
news:m3************@localhost.localdomain...
"Mike Wahler" <mk******@mkwahler.net> writes:
You are passlisted....NOW :-)


"passlisted?" I'm not familiar with that term.


Possibly... added to the list of people allowed to pass through
his not-a-spammer?-then-confirm-yourself filter...?


Ah, could be. In which case I'll take that as a compliment. :-)

-Mike
Nov 13 '05 #91
"Mike Wahler" <mk******@mkwahler.net> wrote:
"cody" <do*********************@gmx.de> wrote in message
news:cl****************@plethora.net...

First, I will initially take at face value your statement
that you are not trolling.


I've just seen some of "cody"'s posts in another programming newsgroup,
and have come to the conclusion that it _is_ a troll.

Richard
Nov 13 '05 #92
> > First, I will initially take at face value your statement
that you are not trolling.


I've just seen some of "cody"'s posts in another programming newsgroup,
and have come to the conclusion that it _is_ a troll.

what??? what makes you think that?

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk
Nov 13 '05 #93
that's what i call an answer :)
First, I will initially take at face value your statement
that you are not trolling. Let's see what happens after
you read the following:

I'm writing this because you probably do not realize
that Mr. Klein is one of the select few people here
who are the most highly qualified to help people to
learn and work with with the C language, as well as
to explain its various strengths and weaknesses, and
to help you decide if C is the most appropriate tool
for a particular task.
i didn't know who he was i only knew how he reacted to my
question and his answer seemed to me a bit aggressive.
in pieces of the application where speed really matters
you can still use "normal" functions or even static methods
which is basically the same.

in C there arent the simplest things present like constants,
each struct and enum have to be prefixed with "struct" and
"enum". iam sure there is much
more.


Jack replied as he did because he *knows* that:

1. C does not assign an attribute of "normal" or "abnormal"
to functions.

2. C does not define anything called a "static method" or a
"method".


i mean't "why C instead of C++". i assumed all C programmers would use C++
and so i said that this is no problem since in C++ they cann still use
c-functions
or static functions as they are the same as c-functions, basically.

iam sorry if i didn't made that clearer.
6. C does indeed specify a keyword 'const' and its effect
when applied. A constant can also be expressed with a
macro.
i didn't knew that.
Another logical question, again probably designed to
cause to to stop and think about what you wrote.
No personal attacks. (Despite the belief to the
contrary by many, ignorance is not a character flaw,
it's simply a lack of education about one or more
subjects, easily rectified, and without any reason
for shame or embarrassment.)
iam not an ignorant. why do you think i asked this question?
i only wanted reasons why people still use C. ok now i have got enough
reasons.

- C is simpler than C++
- some people don't like OOP
- some people don't want to learn OOP
- some projects don't need OOP
- some platforms dosn't provide a proper C++ compiler.

i didn' know that i would create such a large discussion.
Or is your wisdom to be
inferred by your lack of proper capitalization, punctuation, and
grammar?
Perhaps this remark is justified, perhaps not. It seems
that your irrefutable ignorance about C, combined with
your expression of conclusions without premises might
have caused him to associate your nonfluency with English
with your level of wisdom.

I can understand this reaction, since when you wrote your
first post, (in this English-speaking newsgroup), you did not
indicate that English is not your native language, and
unfortunately, a significant number of people whose native
language *is* English post here with spelling, grammar,
etc. far worse than yours.


so what do you advise? should i write in the subject of my next posting:

"warning! german poster with probably wrong capitalization, punctuation and
grammar"
The content of your post combined with the poor English
probably caused him to believe you were an American
or British troll.
i didn't know that my english is so bad. i would be very grateful if
somebody give me a hint what is wrong with my grammar.
I understand very little German, but my few halfhearted
attempts to learn it quickly informed me that many more
words are capitalized in German than in English; it seems
that every noun is capitalized (only my impression, I'm
not certain.)
that is correct all nouns, proper names and beginnings of a sentence are
capitalised.
If your defense of your English is that
you're German, I would have expected too many capital
letters, not none at all. :-)
you underestimated my lazyness :-[=]

My brief 'learning' experiences with German also indicates
that it uses punctuation as well. Is it true that the
only punctuation characters used consistently are periods
and apostrophes, and that commas are optional, as your
messages seem to show?
some commas in german are optional.

Is it true that sentences are begun in lower case?

neither in english nor in german but my shiftkey is broken.
i brough is to the workshop last week but it is still not ready :)
1. Why do you seem to feel that OOP is the solution to
all programming issues? Have you blindly believed
the 'mass media'?
no, but you can use C++ without programming OOP sinc C++ is a hybrid
language
which supports various programming paradigms, including structured,oop,
functional and more.
2. OOP can be done in virtually any language. Why do
you feel that using a given language's available features
to implement OOP is somehow 'fake'?
oop need language support at least to a certain level. when people programm
oop in C then it is certainly faked.
3. Why do you believe that the insertion of a pointer to
a function into a structure causes the use of that
structure and its function pointer member(s) to become
a component of OOP or OOP itself?
it was just an example how some people fake oop in c.
4. Are you unaware of the several other concepts and
techniques which comprise OOP?
yes. i have good knowlegde about c++,c# and java. a OO-language needs
classes,ctors,dtors,virtual,abstract,static methods and access modifiers.
i consider operator overloading as optional.

does C++ have a concept of sealed classes? that are classes which cannot be
subclassed.
Why do you believe that C++ is the only language which
has features and constructs which directly support OOP?
surely not. it was just an example cos c++ is the successor of c.
You probably have a tool box in your garage. What's
inside? Just a hammer? Just a screwdriver? I suspect
it contains a variety of useful tools. This concept
does not disappear in the programming world.
thats what i meant. why use a tool or another when you have a tool which
combines both?
why use C when you can use C++ which contains C? thats what i meant. you can
use c++,
nobody will force you to use its additinal features.
prove that my thaughts are illogical.


I believe I've done that above. I've done this with the
intention of helping you. I'm curious as to how you will react.


iam indeed grateful as you pointed out that my question was misunderstood
here.
i was wondering why some people didn't understand it, now i know why.
Are you saying that when a programming language reaches a
certain age it becomes obsolete or 'unreasonable to use'?
Why?
no, i'm not saying that.
Have you never considered the *domain* of a particular
language? Are you unaware of the concept of "existing code
base?" Simple economics?
nobody will throw away C. it still exists in C++ as C++ is fully backward
compatible(at least C94 if iam correctly informed)
Would you have people throw away perfectly good code
which *already performs its task satisfactorily*
and write it all over again from scratch? Expend the
resources for design alterations often necessary when
moving to a new language? For testing and debugging?
For the extra hardware probably required for the necessary
"run in parallel" period? In a pointless, misguided quest
to be "modern?"
surely not.
Are you suffering from the misconception that any given
single language is or can be the solution to all programming
issues?
surely not.
If you want to discuss or learn about C, this is the place.
If you want to criticize it or compare it with other languages,
this is not the place.
i wanted to learn about C why people still use it and now i know why :)
There. I feel better now. :-)


me to..

now i know why iam always misunderstood here: it certainly is my bad grammar
:-)

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk
Nov 13 '05 #94
> >is "const float PI=3.14" possible in plain C?

If you're not aware of the basic standard C features, what makes you
think that you're qualified to participate to this discusion?

who are you to determine who can participate here and who not?
i just determined you are a very rude &$§"$"!/§$") and
do not deserve to discuss here.

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk
Nov 13 '05 #95
cody wrote:
<snip 1> - C is simpler than C++
- some people don't like OOP
- some people don't want to learn OOP
- some projects don't need OOP
- some platforms dosn't provide a proper C++ compiler.
<snip 2> why use C when you can use C++ which contains C? thats what i meant. you can
use c++,
nobody will force you to use its additinal features.
<snip 3> nobody will throw away C. it still exists in C++ as C++ is fully backward
compatible(at least C94 if iam correctly informed)


ad 2)
just do it, if 1) or policy is no showstopper

ad 3)
not true (and easily found out by googling f.e. this ng
or http://www.google.com/search?hl=de&i...lient=googlet& \
q=c+%22c%2B%2B%22+++compatibility&btnG=Google+Such e&lr=).

There's a whole series of articles by B. Stroustrup about pros and cons of making
them more compatible:
http://www.cuj.com/documents/s=8011/cuj0207stroustr/ ff.

a "german poster with probably wrong capitalization, punctuation and grammar"
Nov 13 '05 #96
cody wrote:
is "const float PI=3.14" possible in plain C?


If you're not aware of the basic standard C features, what makes you
think that you're qualified to participate to this discusion?


who are you to determine who can participate here and who not?
i just determined you are a very rude &$§"$"!/§$") and
do not deserve to discuss here.

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk


you might find out ...
after being plonked by everybody knowledgeable.

*plonk*
Nov 13 '05 #97
cody wrote:
.... snip ...
neither in english nor in german but my shiftkey is broken.
i brough is to the workshop last week but it is still not ready :)
1. Why do you seem to feel that OOP is the solution to
all programming issues? Have you blindly believed
the 'mass media'?


no, but you can use C++ without programming OOP sinc C++ is a

______________________^_______________________^^^_ _____^

Nothing broken, but showing that you fail to capitalize I and the
beginning of sentences purely to annoy. You are rapidly
approaching PLONK status, which will harm you if some time you
really want information.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
Nov 13 '05 #98
cody wrote:
is "const float PI=3.14" possible in plain C?


If you're not aware of the basic standard C features, what makes
you think that you're qualified to participate to this discusion?


who are you to determine who can participate here and who not?
i just determined you are a very rude &$§"$"!/§$") and
do not deserve to discuss here.


That does it. PLONK.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!

Nov 13 '05 #99
cody <do*********************@gmx.de> scribbled the following:
>is "const float PI=3.14" possible in plain C?
If you're not aware of the basic standard C features, what makes you
think that you're qualified to participate to this discusion?

who are you to determine who can participate here and who not?
i just determined you are a very rude &$§"$"!/§$") and
do not deserve to discuss here.


I'll join the club. *PLONK*

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ---------------------------\
| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste W++ B OP+ |
\----------------------------------------- Finland rules! ------------/
"Make money fast! Don't feed it!"
- Anon
Nov 13 '05 #100

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: William C. White | last post by:
Does anyone know of a way to use PHP /w Authorize.net AIM without using cURL? Our website is hosted on a shared drive and the webhost company doesn't installed additional software (such as cURL)...
2
by: Albert Ahtenberg | last post by:
Hello, I don't know if it is only me but I was sure that header("Location:url") redirects the browser instantly to URL, or at least stops the execution of the code. But appearantely it continues...
3
by: James | last post by:
Hi, I have a form with 2 fields. 'A' 'B' The user completes one of the fields and the form is submitted. On the results page I want to run a query, but this will change subject to which...
0
by: Ollivier Robert | last post by:
Hello, I'm trying to link PHP with Oracle 9.2.0/OCI8 with gcc 3.2.3 on a Solaris9 system. The link succeeds but everytime I try to run php, I get a SEGV from inside the libcnltsh.so library. ...
1
by: Richard Galli | last post by:
I want viewers to compare state laws on a single subject. Imagine a three-column table with a drop-down box on the top. A viewer selects a state from the list, and that state's text fills the...
4
by: Albert Ahtenberg | last post by:
Hello, I have two questions. 1. When the user presses the back button and returns to a form he filled the form is reseted. How do I leave there the values he inserted? 2. When the...
1
by: inderjit S Gabrie | last post by:
Hi all Here is the scenerio ...is it possibly to do this... i am getting valid course dates output on to a web which i have designed ....all is okay so far , look at the following web url ...
2
by: Jack | last post by:
Hi All, What is the PHP equivilent of Oracle bind variables in a SQL statement, e.g. select x from y where z=:parameter Which in asp/jsp would be followed by some statements to bind a value...
3
by: Sandwick | last post by:
I am trying to change the size of a drawing so they are all 3x3. the script below is what i was trying to use to cut it in half ... I get errors. I can display the normal picture but not the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.