Re: C is too old? opinions?




Lasse wrote:
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(.SomeName)
{
area Stack
{
private int[] myStack;

private void someMethod() {};

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

another_source_file.c:

using SomeName(.SomeName);

int main(int argc, char[] *argv)
{
Stack.push(10);
System.printf(Stack.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

Sometime earlier, I've asked similar question about why not add
namespace to c. That thread may have something that interests you.

http://groups.google.com/group/comp.lang.c/browse_frm/thread/64518b74168d8028/ded539c84ac08458?q=c+namespace+waterwalk&rnum=1#ded539c84ac08458

.



Relevant Pages

  • C is too old? opinions?
    ... I am relativ new to the impressive and powerfull C language, but i thinks it is obsolete... ... Why has C not namespaces and a "area idea" where some methods and fields could be hidden from the outside? ... private int[] myStack; ... public int pop(); ...
    (comp.lang.c)
  • Re: C is too old? opinions?
    ... I am relativ new to the impressive and powerfull C language, but i thinks it is obsolete... ... Why has C not namespaces and a "area idea" where some methods and fields could be hidden from the outside? ... private int[] myStack; ... If i was a really good programmer (which i'm not... ...
    (comp.lang.c)
  • Re: C is too old? opinions?
    ... I am relativ new to the impressive and powerfull C language, ... Why has C not namespaces and a "area idea" where some methods and ... private int[] myStack; ...
    (comp.lang.c)
  • Re: eshewing CLOS-style OOP in Common Lisp?
    ... > class LotteryWidget: ... In fact namespaces in C++ function about as packages in Lisp. ... static int get ...
    (comp.lang.lisp)
  • Re: Visual C++ vs Visual C#
    ... int main ... We've added namespaces and shift operators for no gain, ... scope, and using the same name in different scope. ... Still no pointers. ...
    (microsoft.public.vc.language)