C is too old? opinions?

T

Tak-Shing Chan

Tak-Shing Chan said:
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.]

Not so. In comp.lang.c, the word "object" has a clearly-defined meaning. If
he isn't using the word in that sense, his usage is off-topic.

This is basically a summary of what *I* have said in my
previous post (which you have largely snipped and rewritten in
your own words without attributions to me).
Since I
cannot believe he would be so ungentlemanly as to post off-topic material,
I deduce that he is using the word with its topical, C-related meaning.

You can believe in anything you want, but a valid deduction
requires more than mere statements of beliefs.

Tak-Shing
 
A

Andrew Poelstra

Thank you very much.

I will try to write better, and have a better grammar. You will maybe
see a "simplyfied c" in about 5 years from now :p.

I have tried to make a better grammar in this thread. Did i succeed?

Yes, you have. Good job. :)
 
R

Richard Heathfield

Tak-Shing Chan said:
Tak-Shing Chan said:
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.]

Not so. In comp.lang.c, the word "object" has a clearly-defined meaning.
If he isn't using the word in that sense, his usage is off-topic.

This is basically a summary of what *I* have said in my
previous post (which you have largely snipped and rewritten in
your own words without attributions to me).

No, it isn't. Learn to read for comprehension. Especially consider the
importance of the word 'if'. You can accuse me of plagiarism as much as you
want, but a /valid/ accusation requires evidence of plagiarism.

You can believe in anything you want, but a valid deduction
requires more than mere statements of beliefs.

Yes. It requires one or more axioms (statements of belief, assumptions) and
premises (either axioms, observed facts, or results of previous
deductions), and a logical connection between them. In this case, the valid
deduction I drew is as follows:

Axiom: he did not use the word 'object' in an off-topic sense.
Premise: he used the word 'object'.
Deduction: he used the word 'object' in a topical sense.

You can contradict me as much as you want, but a valid contradiction
requires more than mere statements of disagreement.
 
V

v4vijayakumar

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

Don't you think separating specification from its implementation is
necessary.
 
S

Stephen Sprunk

If we took all the features from C++/C#/Java/Perl/whatever and added them
into C, you'd end up with C++/C#/Java/Perl/whatever and not C.

You have a fundamental idea that old is inherently bad; there are certainly
things C doesn't have, but the trade-off is that C is available nearly
everywhere and far more stable/usable than many newer languages. The more
"cool" things you add, the fewer platforms that it can run on.

If C doesn't meet your needs, use a language that does, don't try to change
C.
Simple, as i said, namespaces and usings so instead of:

#include "myfunctions.h"

you write

using myfunctions;

That implies some way for the compiler to determine what the "myfunctions"
namespace contains. In languages that specify an output format, like Java,
they have simply moved the contents of the "headers" into the output file
and made them somewhat automatically generated. The information the
compiler needs has to come from _somewhere_. Dictating output formats is
considered outside the scope of C, so headers are necessary.

S
 
B

Bill Pursell

Lasse said:
Simple, as i said, namespaces and usings so instead of:

#include "myfunctions.h"

you write

using myfunctions;

Just to clarify for myself, I don't think this is really what you
want. From the rest of the thread, it seems that what
you're interested in is the ability to disambiguate a
potential name collision so that while you can't do:

#include<foo.h>
int name_already_in_foo;

you can do:

using foo
int name_already_in_foo;
name_already_in_foo = foo::name_already_in_foo
 
C

Chris Dollin

Lasse said:
I dont want arything from c#... i don't want a JIT for example... i
want C with namespaces, usings, and a "area" thing... :)

It hasn't got them. Use something else. Or build a C compiler with
extensions and try and get people interested.

[If I could add just one feature to C it would be decent namespace
control. And if I could add just one feature to physics I think it
would be the spindizzy. Any bets on which is more likely?]
 
C

Chris Dollin

Lasse said:
I think its workds great in other languages...?

Other languages have other rules to handle what C handles using #includes.

#includes may be utterly awful, but they work well enough to be going on
with: they're not a pressure point on the use of C.
 
R

Robert Latest

On Thu, 13 Jul 2006 11:01:16 +1200,
Ian Collins said:
I'm sure you get my point, but for completeness, it emits

#ifndef _module_filename_h_
#define _module_filename_h_

#endif

Where module is lower case.

It still pollutes implementation namespace.

robert
 
G

goose

Lasse said:
Hi...

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

So do many people; usually they get tired and move on
to C++, or to Java, python, perl, ruby, etc.

If C does not meet your needs, then don't use it.
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.

So use C#.
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());
}

C++ might help you here.
I'm really annoyed ;)

GOOD!!!
They do say necessity is the mother of all invention
so go ahead and come up with a new language; heavens
knows the world could use more languages.
Is im the only own with that point of view?

No; many C++, java, python, perl and ruby developers
are of that view as well.

Which is why they are not C programmers.
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...

So go ahead; nothing gives one experience like experience.

goose,
 
R

Richard Heathfield

Robert Latest said:
On 13 Jul 2006 08:24:51 GMT,


Forget that.

1) You are hardly a stranger to C.
2) The construct led you to think it was incorrect, and you had to check the
naming rules. This cost you a non-zero amount of time.
3) The construct is trivially avoidable without loss of expressive power.

Combining the above leads to a conclusion that seems obvious to me -
avoiding a leading underscore on /any/ identifier is the wisest course.
 
G

goose

Andrew Poelstra wrote:

What exactly is wrong with typing this?:

#ifndef FILE_H_
#define FILE_H_

...

#endif

use
#ifndef H_FILE
#define H_FILE
....
#endif

You don't want to find yourself renaming files
because you suddenly stepped on the implementations
(or the standards) toes :)


goose,
 
G

goose

Hmm... Let's stop the discussion know. I'm feeling some of you don't
like me because of my point of view.

Don't be so quick to judge; maybe they don't like you
for other reasons :).

Anyway, this *is* a little off the topic here (of course
someone *will* flame for not saying "TOTALLY OFFTOPIC"
and someone else will flame me for not saying "TOPICAL" :)
so I suggest you correct all the grammer and spelling
in your original question and post it on comp.std.c

I won't claim that they will like you but at least
there you may be better enlightened.
My only intend was to know what
other programmers think.

You are in comp.lang.c; we all think C is great. Nothing
surprising there :)
And again i don't hate C, there is just something i don't like so much.

You have a few nitpicks; thats fine but I doubt that
you'll find many here who will agree with you.

You see, as you gain more experience using C, you will
find that the way it does some things (like using headers)
is *better* than the C# way (no headers).

Good luck and good day.

goose,
 
G

goose

Lasse wrote:

Thank you very much.

I will try to write better, and have a better grammar.
Good.

You will maybe
see a "simplyfied c" in about 5 years from now :p.

I look forward to simplified C. I hate to spoil your
day but have you taken a look at the D programming language?

http://www.digitalmars.com/d/index.html
I have tried to make a better grammar in this thread. Did i succeed?

You have at least convinced a few people that you are
not a troll and will be taken more seriously. Well done!

goose,
 
G

goose

v4vijayakumar said:
Andrew Poelstra wrote:

<snip>

Don't you think separating specification from its implementation is
necessary.

I assumed that he meant /forced on you/, rather than
/technically necessary/.

goose,
 
G

goose

Gernot said:
Then use D or VisualBasic.NET. TROLL!

PLONK

Man!

Some people are *so* sensitive. I didn't see anything
up there worthy of killfiling but I might be missing
a few social rules if the above exchange resulted
in hurt feelings.

:)


goose,
at least only *one* troll remark.
 
G

goose

Richard Heathfield wrote:

<snipped>

Yes. It requires one or more axioms (statements of belief, assumptions) and
premises (either axioms, observed facts, or results of previous
deductions), and a logical connection between them. In this case, the valid
deduction I drew is as follows:

I like this game :) Can I play too?
(IIRC when I studied, it was
premise1
....
premiseN
-------------
deduction1 (from premises and previous deductions)
....
deductionN (from premises and previous deductions)
-------------
result (from premises and previous deductions)

Axiom: he did not use the word 'object' in an off-topic sense.
Premise: he used the word 'object'.
Deduction: he used the word 'object' in a topical sense.

<grin>
OK, how about this
1. He used the word OBJECT.........................premise
2. He was off-topic................................premise
3. OBJECT was topically used ......................assumption
4. He used the word OBJECT in topical sense........& introduction, 1,
3
5. He used the word OBJECT in off-topic sense......& introduction, 1,
2
6. OBJECT was not topically used...................not elimination 3,
4, 5
7. OBJECT was not topically used...................discharge 3
8. OBJECT was not topically used...................proof

Of course, changing the premises from off-topic to topical
proves just the opposite :)

goose,
WARNING: I have only proved the above, not stated it
as a fact, an observance or a religous citing.
 

Ask a Question

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

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

Ask a Question

Members online

Forum statistics

Threads
474,434
Messages
2,571,691
Members
48,796
Latest member
Greg L.

Latest Threads

Top