Planning to learn C/a new language, your suggestions please

D

Ding Lei

Dear fellows,
I am currently a Java programmer, using it for around 3 years, & felt quite
bored with it. IMHO, Java is too strict on lots of things, unlike Perl, There
is usually only one or two way to do one thing with Java.
Kinda of language I prefer is, elegant syntax, high-speed, wide usage,
robust, great degree of freedom.
I did learned C quite a long time ago, only a bit though. Not really sure is
C the really language approriate?

Need yours Suggestions! Thank you in advance.
 
T

Tim Van Wassenhove

Dear fellows,
I am currently a Java programmer, using it for around 3 years, & felt quite
bored with it. IMHO, Java is too strict on lots of things, unlike Perl, There
is usually only one or two way to do one thing with Java.
Kinda of language I prefer is, elegant syntax, high-speed, wide usage,
robust, great degree of freedom.
I did learned C quite a long time ago, only a bit though. Not really sure is
C the really language approriate?

Imho you should ask yourself first: "What am i trying to do?"
And then find yourself the appropriate tool (language, api, ...) for the
job. It's not because you have a hammer that everything should look like
a nail ;)
 
E

Emmanuel Delahaye

In 'comp.lang.c' said:
I am currently a Java programmer, using it for around 3 years, & felt
quite
bored with it. IMHO, Java is too strict on lots of things, unlike Perl,

Huh! I would like C to me more strict than it is (Like Pascal or Ada, for
example). It would avoid /a lot/ of bad practices.
There is usually only one or two way to do one thing with Java.

Is it a problem ?
Kinda of language I prefer is, elegant syntax, high-speed, wide usage,
robust, great degree of freedom.

C certainley fits to that definition.
I did learned C quite a long time ago, only a bit though. Not really
sure is
C the really language approriate?

A language is just a tool. What to you want to build with that tool?
 
O

osmium

Emmanuel said:
C certainley fits to that definition.

I certainly wouldn't consider C a robust language. The handling of array
overflow problems make a great many programs written in C ticking time
bombs.

I don't think there is a language that meets the OPs criteria. "Wide usage"
is a popularity contest. For example, in a somewhat different field, the
most popular computer is based on the Intel 8086, one would be hard pressed
to find a worse architecture as a base for a computer - even when it was
introduced.

elegant - Algol 60
high-speed - Assembler
wide usage - C
robust - Ada?
great degree of freedom - Assembler
 
M

Malcolm

Ding Lei said:
IMHO, Java is too strict on lots of things, unlike Perl,
is C the really language approriate?
Choice of language is not too important - what matters in programming is the
algorithm you implement, and the maintainability of your code.

If you think Java is "too strict" you will probably abuse the greater
freedom that C allows you to play silly hack tricks and invoke UB or
non-portable behaviour if you feel so inclined.
 
A

August Derleth

I certainly wouldn't consider C a robust language. The handling of array
overflow problems make a great many programs written in C ticking time
bombs.

You can write bad code in any language, of course. C merely requires less
work to write worse code.

Conversely, at least for me, C is a good language in which to write good
code quickly. Reason: C fits in my brain almost completely. I know all of
the operators (and I gloss over the precedence rules with parentheses), a
good bit of the standard library (with one thumb in my system's manpages),
and a good phrasebook of idioms.
I don't think there is a language that meets the OPs criteria. "Wide usage"
is a popularity contest. For example, in a somewhat different field, the
most popular computer is based on the Intel 8086, one would be hard pressed
to find a worse architecture as a base for a computer - even when it was
introduced.

I certainly agree with this. From the Alpha to the Zilog, nothing is quite
so bletcherous as x86.
elegant - Algol 60

I'd have chosen Scheme as the most elegant language I know.
high-speed - Assembler

Usually correct, but hand-crafting really fast code for some machines is
harder than it looks. The Pentiums, for example, have some odd rules about
which opcodes are fast and slow.
wide usage - C

Yes, but this depends on the domain to some extent. Scientists, for
example, like FORTRAN a lot better, and CGI folk prefer one of the
latter-day scripting languages (Perl, Python, Ruby).
robust - Ada?

Ada enforces good practice with a strong version of the Algol type
system, among other things. You could call Pascal 'robust' by the same
metric. Languages like ML and Haskell have a much better type system that
can catch more bugs.
great degree of freedom - Assembler

Or Forth or Perl or even Lisp. 'Freedom' doesn't always mean 'the freedom
to create machine language directly'. It could mean 'rewrite the language'
or 'There's More Than One Way To Do It'.
 
D

Ding Lei

Emmanuel Delahaye said:
Huh! I would like C to me more strict than it is (Like Pascal or Ada, for
example). It would avoid /a lot/ of bad practices.
Another thing I always wondering about is that why is C still so widely used
even if it has so many problems. Because of history? unix? efficient? elegant?
compiler available for almost every platform ?
Is it a problem ?


C certainley fits to that definition.
I heard C isn't very robust, and often anoyyed with that lots of C programs
(under linux) exits only with a "segmentation fault" message.
A language is just a tool. What to you want to build with that tool?
Huh, am not really sure about that too. I guess ... I wanna to find a "good"
language that worth spending a long time, very long time(perhaps 10 years or
more?) to learn and use it, like a girlfriend :) So, for that reason, I hope it
shall be powerful enough, pleased to read/write, robust, continuously
developing(but not always CHANGING), fast(tired of java'ss low speed) ...
execute on it's own(doesn't rely on VM), etc...

Perhaps that's kinda of completist ...and finding this kinda of language may
takes time, but I guess it worth.

Thank you.
 
D

Ding Lei

Emmanuel Delahaye said:
Huh! I would like C to me more strict than it is (Like Pascal or Ada, for
example). It would avoid /a lot/ of bad practices.
Another thing I always wondering about is that why is C still so widely used
even if it has so many problems. Because of history? unix? efficient? elegant?
compiler available for almost every platform ?
Is it a problem ?


C certainley fits to that definition.
I heard C isn't very robust, and often anoyyed with that lots of C programs
(under linux) exits only with a "segmentation fault" message.
A language is just a tool. What to you want to build with that tool?
Huh, am not really sure about that too. I guess ... I wanna to find a "good"
language that worth spending a long time, very long time(perhaps 10 years or
more?) to learn and use it, like a girlfriend :) So, for that reason, I hope it
shall be powerful enough, pleased to read/write, robust, continuously
developing(but not always CHANGING), fast(tired of java'ss low speed) ...
execute on it's own(doesn't rely on VM), etc...

Perhaps that's kinda of completist ...and finding this kinda of language may
takes time, but I guess it worth.

Thank you.
 
M

Martin Dickopp

Another thing I always wondering about is that why is C still so
widely used even if it has so many problems.

What many problems do you mean? I don't see problems with C at all.
The only thing that could be considered problematic is that C is build
on the assumption that the programmer knows what s/he is doing, but
that's not a problem if s/he does indeed know what s/he's doing. :)
Because of history? unix? efficient? elegant? compiler available for
almost every platform ?
Yes.

I heard C isn't very robust,

Depends on what exactly you mean by "robust". C makes certain kinds of
mistakes easier than some other languages do, yes.
and often anoyyed with that lots of C programs (under linux) exits
only with a "segmentation fault" message.

If lots of programs do this, then probably faulty hardware is to blame.
Huh, am not really sure about that too. I guess ... I wanna to find a "good"
language that worth spending a long time, very long time(perhaps 10 years or
more?) to learn and use it, like a girlfriend :) So, for that reason, I hope it
shall be powerful enough, pleased to read/write, robust, continuously
developing(but not always CHANGING),

C certainly is powerful and developing continuously, yet only officially
changing (i.e. a new ISO C standard) about once a decade. I also find
it pleasing to read and write, but that is a matter of opinion.

As to robustness, I'm not sure what mean. C can be abused. If you want
a language that doesn't allow you to abuse it, then C isn't for you.
However, languages which make abuse impossible *cannot* be powerful.
fast(tired of java'ss low speed) ... execute on it's own(doesn't rely
on VM), etc...

That's not a language issue. While C is usually compiled to native
machine code, interpreters for the C language exist, and while Java is
often executed as interpreted byte code, it can also be compiled to
native machine code.

Martin
 
E

Emmanuel Delahaye

In said:
I heard C isn't very robust, and often anoyyed with that lots of C
programs (under linux) exits only with a "segmentation fault" message.

C is definitely not a toy language for junior programmers. Once masterized
(say one to five years, some minds are quicker than others), it can produce
very robust code. Of course you can write bad code in C, probably more easily
than in other more rigid or managed languages, but what makes a program
robust is not the language, but the programmer.
 
E

Emmanuel Delahaye

In said:
Huh, am not really sure about that too. I guess ... I wanna to find a
"good" language that worth spending a long time, very long time(perhaps
10 years or more?) to learn and use it, like a girlfriend :) So, for
that reason, I hope it shall be powerful enough, pleased to read/write,
robust, continuously developing(but not always CHANGING), fast(tired of
java'ss low speed) ... execute on it's own(doesn't rely on VM), etc...

C is fine. I bet that it will survive long, because it's generally the only
alternative to assembly on passed, present and future embedded systems. (I'm
quite sure that some C routines are still running on the Enterprise-D or Data
positronic brain :) )
 
I

I. Appel

Another thing I always wondering about is that why is C still so widely used
even if it has so many problems. Because of history? unix? efficient? elegant?
compiler available for almost every platform ?

<just-a-meaning>

Not main advantages of C:
A. C has small and clear syntax;
B. everything can be written in C;
C. programs in C have excellent performance;
D. programs in C can be written rather fast;
E. programs in C can be debugged rather fast.

The MAIN advantage:
Z. any attempt to improve any characteristic above causes great fail in
some other!

Examples:
Assembler - improves C, fails D, E.
ADA - improves E, fails A.
Java, Python - try to improve D and E, fails A and C.
Common LISP - improves D, fails A and C.
Haskell - improves D and E, fails B.
etc.

</just-a-meaning>

I don't know why C is prefered to Wirth's languages, such as Modula-2 or
Oberon.

Ivan.
 
S

Stephen L.

[ snip ]
Huh, am not really sure about that too. I guess ... I wanna to find a "good"
language that worth spending a long time, very long time(perhaps 10 years or
more?) to learn and use it, like a girlfriend :)

[shields up!]

Then you DEFINITELY want C++!

Remember, these articles live _forever_!
So you'd better hope your girlfriend doesn't
take an interest in her boyfriend's olde Usenet
postings...

(How could I resist :)? )


Stephen
 
M

Martin Dickopp

Stephen L. said:
Ding said:
Huh, am not really sure about that too. I guess ... I wanna to find a "good"
language that worth spending a long time, very long time(perhaps 10 years or
more?) to learn and use it, like a girlfriend :)

[shields up!]

Then you DEFINITELY want C++!

Hmm, I have to ask my girlfriend what programming language she would
most like to be compared to... ;-)
Remember, these articles live _forever_!
So you'd better hope your girlfriend doesn't
take an interest in her boyfriend's olde Usenet
postings...

I understood the OP's statement in the sense that he's looking for a
language that is worth to be learned over a long time of 10 or more
years, not that he intents do learn it and then once he has mastered
it, dump it.

Martin
 
A

August Derleth

<just-a-meaning>

Not main advantages of C:

I think you mean "Note" here.
A. C has small and clear syntax;
B. everything can be written in C;

You use this statement somewhat inconsistently by trying to bash Haskell
with it: Doing everything in C isn't programmer-efficient, but everything
/can/ be done in C in theory. However, /all/ programming languages are
equivalent to C in this respect. (That is, it might not be easy, but it is
possible.)

So to say C can do things Haskell cannot is absurd.
C. programs in C have excellent performance;
D. programs in C can be written rather fast;
E. programs in C can be debugged rather fast.

The MAIN advantage:
Z. any attempt to improve any characteristic above causes great fail in
some other!

I don't think so. For example, most Perl programs I write have excellent
performance, in that I don't notice any delays when I run them.
Examples:
Assembler - improves C, fails D, E.
ADA - improves E, fails A.

Ada's syntax is 'larger', but it isn't so ugly its size becomes bothersome.
Java, Python - try to improve D and E, fails A and C.

On most systems doing most tasks, the performance of interpreted languages
isn't an issue. A Python program will seem as snappy as a C program.

And Python has, in my view, a very clean syntax.
Common LISP - improves D, fails A and C.

Lisp has the simplest syntax that's actually usable by human beings.
Calling Lisp's syntax large is absurd, but calling it absurd is somewhat
defensible. I, however, rather like it.

Note also that people have been making rather good Lisp interpreters since
the mid-1950s. Making a Lisp system as fast as you want isn't a big deal.

(Common Lisp has been called bloated, but that's neither here nor there.)
Haskell - improves D and E, fails B.

Everything /can/ be written in Haskell. (Or, prove that there is a
Turing-computable algorithm that cannot be expressed in Haskell and claim
a very, /very/ large prize. ;-))
etc.

</just-a-meaning>

I don't know why C is prefered to Wirth's languages, such as Modula-2 or
Oberon.

I think Wirth tries to enforce his own ideas too strongly in all of his
languages, from Pascal on out. This is more an issue of semantics than
syntax, but I think the generic Wirth-syntax is rather ugly and verbose,
too.
 
S

Stephen L.

Martin said:
Stephen L. said:
Ding said:
A language is just a tool. What to you want to build with that tool?
Huh, am not really sure about that too. I guess ... I wanna to find a "good"
language that worth spending a long time, very long time(perhaps 10 years or
more?) to learn and use it, like a girlfriend :)

[shields up!]

Then you DEFINITELY want C++!

Hmm, I have to ask my girlfriend what programming language she would
most like to be compared to... ;-)
Remember, these articles live _forever_!
So you'd better hope your girlfriend doesn't
take an interest in her boyfriend's olde Usenet
postings...

I understood the OP's statement in the sense that he's looking for a
language that is worth to be learned over a long time of 10 or more
years, not that he intents do learn it and then once he has mastered
it, dump it.

Ahhh... But isn't how this thread started?

He got bored with Java, found it too restrictive,
wanted to learn a new _wilder_ language that
offers a "great degree of freedom"...

Sounds like a relationship to me :)


-
Stephen
 
R

RoSsIaCrIiLoIA

<just-a-meaning>

Not main advantages of C:
A. C has small and clear syntax;
B. everything can be written in C;
C. programs in C have excellent performance;
D. programs in C can be written rather fast;
E. programs in C can be debugged rather fast.

The MAIN advantage:
Z. any attempt to improve any characteristic above causes great fail in
some other!

Examples:
Assembler - improves C, fails D, E.

for me it is false
the old Assembly improves 'E' too
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top