473,883 Members | 1,596 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(functi on
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.mod erated - moderation address: cl**@plethora.n et
Nov 13 '05
687 23893
Default User <fi********@boe ing.com.invalid > scribbled the following:
Joona I Palaste wrote:
My Mileage May Vary.
Do they still say "mileage" in the UK? Shouldn't it be kilometerage?


I've been to the UK, and trust me, they're as Imperial there as the
folks in the USA. Only difference is, the UK government pretends they're
a metric country.

--
/-- Joona Palaste (pa*****@cc.hel sinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
Nov 13 '05 #441
Object orientation seems to be more a tendancy displayed by some
software modules than a universal paradigm. There are certain points
in a program which appear to act as gateways and which naturally
display extremely simple interfaces. In C++ these are classes, in C
they are separate, carefully defined and documented, modules.

Most unit actions in a program involve complex hooks into many areas
of the system, and start to become very procedural in flavour. They
can be wrapped in a class, but there isn't a lot of point.

The nouns of a problem can be made into objects but are often utterly
trivial and pointless in nature. On the other hand, the true,
non-trivial, processing classes, as building blocks in a larger
processing system, are enormously difficult to find, and may not even
exist. So lots of time gets wasted, hunting for this Holy Grail.

The problem with C++ is that it always opens up a doctrinaire view
that objects are the key to everything.

(1) This nearly always turns into an enormous time-waster (trying to
define the objects, and arguing over every little detail).

(2) This leads to lots of trivial, bathos style code (the nouns). This
may not always make it through to the object code if inline, but it is
still annoying and not a good style.

(3) Understanding a page of code becomes very difficult because the
number of references to other pages (.h files) has gone up enormously.
Most of these classes are very trivial, but they still have to be
looked up to understand the code. Often what they are doing is
equivalent to just a few executable statements. Creating essentially
one's own virtual machine is valuable for very complex entities, but
is a nuisance for things that are very trivial eg an incrementing
variable.

(4) The guide could be a UML model, but this always, without
exception, turns into an absurdly slow way to write a program. The
model always gets thrown away at some point in the development.
Graphical representation never seems to have been as effective for
software implementation as it has undoubtedly been for electronic
circuits.

The fear was that extremely large C programs would become
unmanageable. Also, the hope was that OO would produce massive re-use.
Neither of these seems real. OO projects always take an absurdly large
number of man-hours to produce very little that is completed and is
demonstrable. They also involve an unusual degree of blame, politics,
and back-biting. Something has clearly gone wrong.

The people who opt for very modular C, often but not exclusively with
an Electrical Engineering background, are taking a well-informed
decision.
Nov 13 '05 #442
Joona I Palaste <pa*****@cc.hel sinki.fi> wrote:
Default User <fi********@boe ing.com.invalid > scribbled the following:
Joona I Palaste wrote:
My Mileage May Vary.

Do they still say "mileage" in the UK? Shouldn't it be kilometerage?


I've been to the UK, and trust me, they're as Imperial there as the
folks in the USA. Only difference is, the UK government pretends they're
a metric country.


Yes, and they measure speed in furlongs per fortnight. :)

--
Irrwahn
(ir*******@free net.de)
Nov 13 '05 #443
James Kuyper wrote:
Richard Heathfield <do******@addre ss.co.uk.invali d> wrote in message
news:<bn******* ***@hercules.bt internet.com>.. .
James Kuyper wrote:
<snip>
> "Correct code for that implementation" is "correct code", for that
> implementation. The fact that it's not portable doesn't make it
> incorrect.
MMMV. :-)


I don't recognize that one. Sorry.


My Mileage May Vary. (That is, I don't happen to share your opinion on the
matter of whether non-portable code is correct C code.)
However, I'd like to point out that
not all code needs to be portable. Some code is, by deliberate and
well-thought-out design, intended only for a restricted set of
platforms.
Sure. For example, if the spec calls for a Windows program with all the
normal Windows furniture, then this isn't going to be a portable program
any time soon. On the other hand, much of the back end can still be
portable.
Still, deliberately non-portable code is a specialized need, and I'd
certainly recommend that all C programmers learn first how to write
portable code. They can learn how to write code that is deliberately
non-portable, when and if they ever run into one of the rare
situations where it is appropriate.
Right. My own position is that maximal portability is a position that it is
advisable to take at the outset, falling back to less portable code only as
and when it proves necessary (and isolating that less portable code to make
it easier to port when the time comes).
...
> 6. Storage class specifiers as part of the definition of a pure type;
> that is, a typedef, or a struct, union, or enumeration declaration
> that is not also the declaring any particular object of that type.


Could you possibly elaborate on this? What, specifically, is the problem
here?


It's legal in C, and not legal in C++. Of course, it's not much of a
problem. The reason it was made illegal in C++ is that storage class
specifiers are meaningless except when actually declaring an object
requiring storage.


Thanks for clearing that up.

--
Richard Heathfield : bi****@eton.pow ernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 13 '05 #444
Irrwahn Grausewitz wrote:
Joona I Palaste <pa*****@cc.hel sinki.fi> wrote:
Default User <fi********@boe ing.com.invalid > scribbled the following:
Joona I Palaste wrote:
My Mileage May Vary.

Do they still say "mileage" in the UK? Shouldn't it be kilometerage?


I've been to the UK, and trust me, they're as Imperial there as the
folks in the USA. Only difference is, the UK government pretends they're
a metric country.


Yes, and they measure speed in furlongs per fortnight. :)


This is absolutely false. The UK has no use for such large units.

--
Richard Heathfield : bi****@eton.pow ernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 13 '05 #445
Richard Heathfield <do******@addre ss.co.uk.invali d> wrote:
Irrwahn Grausewitz wrote:
Joona I Palaste <pa*****@cc.hel sinki.fi> wrote:
Default User <fi********@boe ing.com.invalid > scribbled the following:
Joona I Palaste wrote:
> My Mileage May Vary.

Do they still say "mileage" in the UK? Shouldn't it be kilometerage?

I've been to the UK, and trust me, they're as Imperial there as the
folks in the USA. Only difference is, the UK government pretends they're
a metric country.


Yes, and they measure speed in furlongs per fortnight. :)


This is absolutely false. The UK has no use for such large units.


You got no snails in the UK? :)
--
Irrwahn
(ir*******@free net.de)
Nov 13 '05 #446
On Tue, 28 Oct 2003 23:15:13 +0100, in comp.lang.c , Irrwahn
Grausewitz <ir*******@free net.de> wrote:
Richard Heathfield <do******@addre ss.co.uk.invali d> wrote:

This is absolutely false. The UK has no use for such large units.


You got no snails in the UK? :)


French et em all.
:-)
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.c om/ms3/bchambless0/welcome_to_clc. html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 13 '05 #447
Irrwahn Grausewitz wrote:
Richard Heathfield <do******@addre ss.co.uk.invali d> wrote:
Irrwahn Grausewitz wrote:
Joona I Palaste <pa*****@cc.hel sinki.fi> wrote:

Default User <fi********@boe ing.com.invalid > scribbled the following:
> Joona I Palaste wrote:
>> My Mileage May Vary.

> Do they still say "mileage" in the UK? Shouldn't it be kilometerage?

I've been to the UK, and trust me, they're as Imperial there as the
folks in the USA. Only difference is, the UK government pretends they're
a metric country.

Yes, and they measure speed in furlongs per fortnight. :)


This is absolutely false. The UK has no use for such large units.


You got no snails in the UK? :)


We have snails, but not turbosnails.

The official unit for speed in the UK is chains per season, a much smaller
unit (and, unhappily, less alliterative than "furlongs per fortnight",
which is probably the reason for the misunderstandin g).

--
Richard Heathfield : bi****@eton.pow ernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 13 '05 #448
Irrwahn Grausewitz <ir*******@free net.de> wrote:
Joona I Palaste <pa*****@cc.hel sinki.fi> wrote:
Default User <fi********@boe ing.com.invalid > scribbled the following:
Joona I Palaste wrote:
My Mileage May Vary.

Do they still say "mileage" in the UK? Shouldn't it be kilometerage?


I've been to the UK, and trust me, they're as Imperial there as the
folks in the USA. Only difference is, the UK government pretends they're
a metric country.


Yes, and they measure speed in furlongs per fortnight. :)


Only in the shed, shurely?

Richard
Nov 13 '05 #449
Richard Heathfield <do******@addre ss.co.uk.invali d> wrote:
Irrwahn Grausewitz wrote:
Richard Heathfield <do******@addre ss.co.uk.invali d> wrote:
Irrwahn Grausewitz wrote:
Yes, and they measure speed in furlongs per fortnight. :)
This is absolutely false. The UK has no use for such large units. You got no snails in the UK? :)

We have snails, but not turbosnails.


Turbo? Let's see:

1 furlong == 201.168 m
1 fortnight == 14 d == 1209600 s
1 furlong / fortnight == 14.369 m/d == 1.663e-4 m/s

To me that seems to be a suitable unit to measure snail speed. :)
The official unit for speed in the UK is chains per season, a much smaller
unit (and, unhappily, less alliterative than "furlongs per fortnight",
which is probably the reason for the misunderstandin g).


:D

--
Irrwahn
(ir*******@free net.de)
Nov 13 '05 #450

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

Similar topics

3
11266
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) on the server because of that. Our site will have an SSL certificate next week, so I would like to use AIM instead of SIM, however, I don't know how to send data via POST over https and recieve data from the Authorize.net server over an https...
2
5865
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 to execute the code until the browser send his reply to the header instruction. So an exit(); after each redirection won't hurt at all
3
23053
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 field is completed.
0
8508
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. 354 roberto@ausone:Build/php-4.3.2> ldd /opt/php4/bin/php libsablot.so.0 => /usr/local/lib/libsablot.so.0 libstdc++.so.5 => /usr/local/lib/libstdc++.so.5 libm.so.1 => /usr/lib/libm.so.1
1
8621
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 column below. The viewer can select states from the drop down lists above the other two columns as well. If the viewer selects only one, only one column fills. If the viewer selects two states, two columns fill. Etc. I could, if appropriate, have...
4
18317
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 user comes back to a page where he had a submitted POST data the browser keeps telling that the data has expired and asks if repost. How to avoid that? I tried registering all POST and GET vars as SESSION vars but
1
6890
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 http://www.mis.gla.ac.uk/biquery/training/ but each of the courses held have maximum of 8 people that could be
2
31461
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 to :parameter I dont like the idea of making the SQL statement on the fly without binding parameters as I dont want a highly polluted SQL cache.
3
23617
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 results of the picture half the size. The PHP I have installed support 1.62 or higher. And all I would like to do is take and image and make it fit a 3x3. Any suggestions to where I should read or look would be appreciated.
0
9936
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9791
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10845
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10412
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7970
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7123
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5990
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4215
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3231
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.