473,651 Members | 2,518 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C is too old? opinions?

Hi...

I am relativ new to the impressive and powerfull C language, but i
thinks it is obsolete...

The idea with header/source files where methods can clash into
eachother i don't like... Look at C# which is much cleaner with
namespaces.

Why has C not namespaces and a "area idea" where some methods and
fields could be hidden from the outside?

Something like:

a_source_file.c :

namespace SomeName(.SomeN ame)
{
area Stack
{
private int[] myStack;

private void someMethod() {};

public void push(int i) {};
public int pop() {};
}
}

another_source_ file.c:

using SomeName(.SomeN ame);

int main(int argc, char[] *argv)
{
Stack.push(10);
System.printf(S tack.pop());
}

I'm really annoyed ;) Is im the only own with that point of view?

If i was a really good programmer (which i'm not... yet! ;)) i would
developed a compiler and a much more simple (but still impressive and
powerfull) c...

Best and kindest regards
Lasse Espeholt

Jul 12 '06
187 6433
On 2006-07-13 00:15:37 +0200, "Default User" <de***********@ yahoo.comsaid:
Lasse Espeholt wrote:
>Hi...

I am relativ new to the impressive and powerfull C language, but i
thinks it is obsolete...

What you think is largely irrelevant. C isn't going anywhere, and is
still the language of choice for many applications.
>The idea with header/source files where methods can clash into
eachother i don't like... Look at C# which is much cleaner with
namespaces.

Gawd. If you must have that, C++ is a far better idea.

Brian
better but still not perfect...
:)

Jul 12 '06 #31
On 2006-07-13 00:26:00 +0200, Andrew Poelstra <ap*******@nowh ereat.allsaid:
On 2006-07-12, Lasse Espeholt <Lassewrote:
>On 2006-07-12 23:58:00 +0200, Andrew Poelstra <ap*******@nowh ereat.allsaid:
>>On 2006-07-12, Lasse Espeholt <Lassewrote:
On 2006-07-12, Andrew Poelstra <ap*******@nowh ereat.allsaid:
Headers aren't technically necessary in C, either... it's still a
terrible idea to try and get along without them.

I think its workds great in other languages...?

A) Stop ending all of your statements with ellipses and question marks.
B) I don't think it works well in other languages; it's much nicer to
read a header to find the prototype of a function than to have to
find the definition, or documentation, or wherever else you might
find help.
A. Sorry for my formatting, i will try not to use question marks

B. In a modern IDE all the functions is listed.

Jul 12 '06 #32
On 2006-07-13 00:29:04 +0200, Ian Collins <ia******@hotma il.comsaid:
Lasse Espeholt wrote:
>On 2006-07-13 00:19:03 +0200, Ian Collins <ia******@hotma il.comsaid:
>>Lasse Espeholt wrote:

On 2006-07-12 23:58:00 +0200, Andrew Poelstra <ap*******@nowh ereat.all>
said:

>
Headers aren't technically necessary in C, either... it's still a
terrible idea to try and get along without them.

I think its workds great in other languages...?

They have rules to enforce application layout and/or complex object
names that include a search path. What would you rather have:

path.to.some. external.wibble .a();

or

#include "wibble.h"

a();


I like to have namespaces and using... ;)
So what's the difference in typing a few includes or the equivalent
using directives?
with includes you risk that the files have functions there have the same name.

with includes you shall write "ifndef __FILE_H__" otherwise you could
end up in trouble.

Jul 12 '06 #33
On 2006-07-13 00:31:23 +0200, Ian Collins <ia******@hotma il.comsaid:
Andrew Poelstra wrote:
>On 2006-07-12, Lasse Espeholt <Lassewrote:
>>On 2006-07-12 23:58:00 +0200, Andrew Poelstra <ap*******@nowh ereat.allsaid:
On 2006-07-12, Lasse Espeholt <Lassewrote:

On 2006-07-12, Andrew Poelstra <ap*******@nowh ereat.allsaid:

Headers aren't technically necessary in C, either... it's still a
terrible idea to try and get along without them.

I think its workds great in other languages...?

A) Stop ending all of your statements with ellipses and question marks.
B) I don't think it works well in other languages; it's much nicer to
read a header to find the prototype of a function than to have to
find the definition, or documentation, or wherever else you might
find help.
I'd second both points.

I've been doing a lot of PHP recently, and it is a real pain not having
a header like summary of an object's member functions. So much so, I
end up creating interfaces as a header replacement.
Maybe you should try a better IDE... with the Visual Studio and ASP.net
(c#, java,...) all methods(functio ns, procedure and what they are
called) is listed...

But i must amitted that i have'nt meet any well written PHP IDE, so
from that point of view i will agree with you....

Jul 12 '06 #34

<Lasse Espeholtwrote in message
news:44******** *************** @dread16.news.t ele.dk...
Hi...

I am relativ new to the impressive and powerfull C language, but i thinks
it is obsolete...

The idea with header/source files where methods can clash into eachother i
don't like... Look at C# which is much cleaner with namespaces.

Why has C not namespaces and a "area idea" where some methods and fields
could be hidden from the outside?
It does: static methods are hidden to the world outside the file in which
they are defined.

<snip>>
Best and kindest regards
Lasse Espeholt
--
Fred L. Kleinschmidt
Boeing Associate Technical Fellow
Technical Architect, Software Reuse Project
Jul 12 '06 #35
Lasse Espeholt wrote:
On 2006-07-13 00:29:04 +0200, Ian Collins <ia******@hotma il.comsaid:
>Lasse Espeholt wrote:
>>I like to have namespaces and using... ;)
So what's the difference in typing a few includes or the equivalent
using directives?


with includes you risk that the files have functions there have the same
name.
That's why C++ added namespaces, the only remedy in C is care.
with includes you shall write "ifndef __FILE_H__" otherwise you could
end up in trouble.
I don't, my boilerplate generator does. In your case, I'm sure your
modern IDE would do the same.

--
Ian Collins.
Jul 12 '06 #36
On Thu, 13 Jul 2006 00:31:02 +0200, Lasse Espeholt wrote:
>
I want a C with namespaces, usings, a "area" thing and without header files
It's becoming obvious that whatever it is that you want, it isn't C. I
suggest that you identify the language you do want, and then find a
suitable place to discuss it (it won't be here.)

--
Al Balmer
Sun City, AZ
Jul 12 '06 #37
On Wed, 12 Jul 2006, Richard Heathfield wrote:
Lasse Espeholt said:

<snip>
>I'm looking for the simplicity of c# without objects ;)
[It is very clear that Lasse is talking about objects in the
C# sense here.]

[Richard Heathfield continued:]
Then C is the wrong place to look. C has objects. So does C++, so it's no
good looking there, either.
While C does have objects, its definition (``object: a
region of data storage in the execution environment, the contents
of which can represent values'', C90/C99 3.14) is totally
different from that of C# which was the context of this subthread
(``The object class type is the ultimate base class of all other
types. Every type in C# directly or indirectly derives from the
object class type'', ECMA-334 11.2.2).

By comparing C objects with C# objects, one is making a
faulty analogy (also known as ``comparing apples with oranges'').

Better is to write that C# is off-topic here without making
that gratuitous (and logically unsound) remark.

Tak-Shing
Jul 12 '06 #38
On 2006-07-12, Lasse Espeholt <Lassewrote:
nobody forcing me - no, but in some cases C is a wonderfull
language.... don't get me wrong... i don't hate the language... it is
infact one of my favourites but i think some things could be done
better... i think it has some things there issent nessesary in modern
languages... for example header files...

hhm... it is correct that nobody is stopping me, but i stops myself...
I'm not good enogh....
Well, then learn and become good enough. Also, please use proper
capitalization and punctuation.

--
Andrew Poelstra <http://www.wpsoftware. net/projects/>
To email me, use "apoelstra" at the above domain.
"You people hate mathematics." -- James Harris
Jul 12 '06 #39
On 2006-07-13 00:40:42 +0200, Ian Collins <ia******@hotma il.comsaid:
Lasse Espeholt wrote:
>On 2006-07-13 00:29:04 +0200, Ian Collins <ia******@hotma il.comsaid:
>>Lasse Espeholt wrote:

I like to have namespaces and using... ;)

So what's the difference in typing a few includes or the equivalent
using directives?


with includes you risk that the files have functions there have the same
name.
That's why C++ added namespaces, the only remedy in C is care.
>with includes you shall write "ifndef __FILE_H__" otherwise you could
end up in trouble.
I don't, my boilerplate generator does. In your case, I'm sure your
modern IDE would do the same.
Hmm, it seems like we come from two different worlds, but there is room
enogh to both opinions :) but i must amit that i throught many had the
same opinion as i do :)

Jul 12 '06 #40

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

Similar topics

35
3210
by: jerrygarciuh | last post by:
Hi all, I was just wondering what popular opinion is on PHP giving this warning: Warning: Invalid argument supplied for foreach() in /home/boogerpic/public_html/my.php on line 6 when presented with an indefined variable. It makes sense to me to warn if an unacceptably defined var is passed but it
2
3197
by: Kari Laitinen | last post by:
During the past 15 years I have been writing computer programs with so-called natural names, which means that the names (identifiers, symbols) in progarms are constructed of several natural words. I have even written a C++ book in which all programs are written with natural names. More information and free pages of the book can be found at http://www.naturalprogramming.com/cppbook.html I'm planning to produce similar books with the C#...
29
2389
by: David Eng | last post by:
In replying to P.J. Plauger ( http://groups.google.com/groups?dq=&hl=en&lr=&ie=UTF-8&threadm=1089204435.746211%40master.nyc.kbcfp.com&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26group%3Dcomp.lang.c%252B%252B.moderated ) who responded my post in comp.long.c++ moderated neww group regarding "C++ standard and C++/CLI" topic, I worte the following post which was sensor by comp.lang.c++.moderated: ...
3
2130
by: Jack Klein | last post by:
I'm looking for opinions on a C technique I, and others, have used successfully in the past. While some people swear by, apparently others swear at it. Assume a part of a program too large to fit comfortably in a single source file, call it a "module". Let's call it "module A". Also assume for various reasons module A needs a private data store with static storage duration, accessible from files in more than one translation unit. ...
3
2610
by: John Doe | last post by:
I've been doing some reading/research on parsing simple configuration files through C, and have heard various opinions on the matter. I'd like to solicit some opinions and design criteria (as well as "gotchas") for doing this. I'm implementing a program that needs to read a standard configuration file, in key=value pairs for starters (though I'm open to other ideas). Basically it would be no more than about 20 lines total, one key per...
10
1467
by: John Swan | last post by:
Please, I have just created this site and am wondering what your opinion is from both professionals and amatures or the curious alike. Any opinions? www.integrated-dev-sol.co.uk Remove 123 from email address to reply. Anti spam and virus measure.
0
1423
by: Florian Thiel | last post by:
Dear PHP web developers, We are currently researching the ways in which the major web development platforms differ and in addition to our work with the Plat_Forms contest, we're now looking for actual professional opinions. If you have practical experience in the development of non-trivial web applications with two or more web development languages then we would like you to participate in a short survey. Three PHP teams competed in
5
1543
by: JT | last post by:
Hi, I would like opinions on a shareware issue. If shareware uses an online database to hold registration codes, which get copied locally and therefore only needs to check online if the shareware is not yet registered or if the registration code was lost, should there be an "Is it okay to go get your lost registration code?" message box? I've been told that certain firewalls will disallow everything until you've allowed it. I imagine...
1
1360
by: happyperson | last post by:
Hi All, I want to have a news and product review website. I want an RSS feed, online forum, article submission section, and possibly down the road the ability to upload/download music to this website. I am thinking about using PHP-Nuke 8.0 since that is what I am familiar with. I know Joomla and Drupal are supposedly nice CMS as well. Is PHP-Nuke too much hassle due to what I have heard about it's security issues or is this issue exaggerated...
21
2649
by: Steve Swift | last post by:
On page 90 of my O'Reilly "Javascript The definitive guide" 3rd edition there is an example of an If/Else construct: (some text removed) If (username != null) alert("Hello " + username); else { username = prompt("What is your name?"); alert("Hello " + username); }
0
8349
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
8695
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8460
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
8576
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...
0
7296
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6157
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
5609
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
4281
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2696
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.