473,396 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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


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.

--
Ding Lei
Nov 14 '05 #1
16 1691
In article <87************@dinglei.ipanel.com.cn>, Ding Lei wrote:

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 ;)

--
Tim Van Wassenhove <http://home.mysth.be/~timvw/contact.php>
Nov 14 '05 #2
In 'comp.lang.c', Ding Lei <di*****@ipanel.cn> wrote:
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?

--
-ed- get my email here: http://marreduspam.com/ad672570
The C-language FAQ: http://www.eskimo.com/~scs/C-faq/top.html
C-reference: http://www.dinkumware.com/manuals/reader.aspx?lib=c99
FAQ de f.c.l.c : http://www.isty-info.uvsq.fr/~rumeau/fclc/
Nov 14 '05 #3
Emmanuel Delahaye writes:
Kinda of language I prefer is, elegant syntax, high-speed, wide usage,
robust, great degree of freedom.


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

Nov 14 '05 #4
"Ding Lei" <di*****@ipanel.cn> wrote in message

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.
Nov 14 '05 #5
On Sun, 30 May 2004 05:44:08 -0700, osmium wrote:
Emmanuel Delahaye writes:
> Kinda of language I prefer is, elegant syntax, high-speed, wide usage,
> robust, great degree of freedom.
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.


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'.

--
yvoregnevna gjragl-guerr gjb-gubhfnaq guerr ng lnubb qbg pbz
To email me, rot13 and convert spelled-out numbers to numeric form.
"Makes hackers smile" makes hackers smile.

Nov 14 '05 #6
Emmanuel Delahaye <em**********@noos.fr> writes:
In 'comp.lang.c', Ding Lei <di*****@ipanel.cn> wrote:
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.

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 ?
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 heard C isn't very robust, and often anoyyed with that lots of C programs
(under linux) exits only with a "segmentation fault" message.
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?

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.

-- -ed- get my email here: http://marreduspam.com/ad672570 The C-language
FAQ: http://www.eskimo.com/~scs/C-faq/top.html C-reference:
http://www.dinkumware.com/manuals/reader.aspx?lib=c99 FAQ de f.c.l.c :
http://www.isty-info.uvsq.fr/~rumeau/fclc/


--
Ding Lei
Nov 14 '05 #7
Emmanuel Delahaye <em**********@noos.fr> writes:
In 'comp.lang.c', Ding Lei <di*****@ipanel.cn> wrote:
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.

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 ?
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 heard C isn't very robust, and often anoyyed with that lots of C programs
(under linux) exits only with a "segmentation fault" message.
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?

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.

-- -ed- get my email here: http://marreduspam.com/ad672570 The C-language
FAQ: http://www.eskimo.com/~scs/C-faq/top.html C-reference:
http://www.dinkumware.com/manuals/reader.aspx?lib=c99 FAQ de f.c.l.c :
http://www.isty-info.uvsq.fr/~rumeau/fclc/


--
Ding Lei
Nov 14 '05 #8
dl*****@christian.net (Ding Lei) writes:
Emmanuel Delahaye <em**********@noos.fr> writes:
In 'comp.lang.c', Ding Lei <di*****@ipanel.cn> wrote:
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.

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.
Kinda of language I prefer is, elegant syntax, high-speed, wide usage,
robust, great degree of freedom.


C certainley fits to that definition.

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.
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?

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
--
,--. Martin Dickopp, Dresden, Germany ,= ,-_-. =.
/ ,- ) http://www.zero-based.org/ ((_/)o o(\_))
\ `-' `-'(. .)`-'
`-. Debian, a variant of the GNU operating system. \_/
Nov 14 '05 #9
In 'comp.lang.c', dl*****@christian.net (Ding Lei) wrote:
Emmanuel Delahaye <em**********@noos.fr> writes:
Kinda of language I prefer is, elegant syntax, high-speed, wide
usage,
robust, great degree of freedom.


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.


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.

--
-ed- get my email here: http://marreduspam.com/ad672570
The C-language FAQ: http://www.eskimo.com/~scs/C-faq/top.html
C-reference: http://www.dinkumware.com/manuals/reader.aspx?lib=c99
FAQ de f.c.l.c : http://www.isty-info.uvsq.fr/~rumeau/fclc/
Nov 14 '05 #10
In 'comp.lang.c', dl*****@christian.net (Ding Lei) wrote:
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...


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 :-) )

--
-ed- get my email here: http://marreduspam.com/ad672570
The C-language FAQ: http://www.eskimo.com/~scs/C-faq/top.html
C-reference: http://www.dinkumware.com/manuals/reader.aspx?lib=c99
FAQ de f.c.l.c : http://www.isty-info.uvsq.fr/~rumeau/fclc/
Nov 14 '05 #11
"Ding Lei" <dl*****@christian.net> wrote in message
news:46*************************@posting.google.co m...
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.


Nov 14 '05 #12
Ding Lei wrote:


[ snip ]

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++!

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
Nov 14 '05 #13
"Stephen L." <sd*********@cast-com.net> writes:
Ding Lei wrote:
> 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.

Martin
--
,--. Martin Dickopp, Dresden, Germany ,= ,-_-. =.
/ ,- ) http://www.zero-based.org/ ((_/)o o(\_))
\ `-' `-'(. .)`-'
`-. Debian, a variant of the GNU operating system. \_/
Nov 14 '05 #14
On Thu, 03 Jun 2004 00:58:28 +0600, I. Appel wrote:
"Ding Lei" <dl*****@christian.net> wrote in message
news:46*************************@posting.google.co m...
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:


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.

Ivan.


--
yvoregnevna gjragl-guerr gjb-gubhfnaq guerr ng lnubb qbg pbz
To email me, rot13 and convert spelled-out numbers to numeric form.
"Makes hackers smile" makes hackers smile.

Nov 14 '05 #15
Martin Dickopp wrote:

"Stephen L." <sd*********@cast-com.net> writes:
Ding Lei wrote:

> 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
Nov 14 '05 #16
On Thu, 3 Jun 2004 00:58:28 +0600, "I. Appel"
<ia****@rol.kill.the.spammers.ru> wrote:
"Ding Lei" <dl*****@christian.net> wrote in message
news:46*************************@posting.google.c om...
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.


for me it is false
the old Assembly improves 'E' too
Nov 14 '05 #17

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

Similar topics

17
by: Rob | last post by:
i know javascript, vbscript, asp css and alot more and im only 14 i was wondering which is easier to learn php or cgi. any help?
8
by: Hermawih | last post by:
Hello , I want your opinion about this . In order to say it clearly , I think I have to describe it in long sentences . I could consider myself as Intermediate/Advance Access Developer ;...
4
by: Richard | last post by:
I created a program which uses the srand function to generate random numbers. The program is suppose to help an elementary student learn multipliation and ask a question, "How much is 6 times 7?"....
2
by: Zygo Blaxell | last post by:
I have a table with a few million rows of temperature data keyed by timestamp. I want to group these rows by timestamp intervals (e.g. every 32 seconds), compute aggregate functions on the...
6
by: TB | last post by:
Hi Everyone on comp.lang.c++: I am thinking about learning a programming language and I want to decide whether it is worthwhile spending my time learning the C++ programming language. I am a...
34
by: pandit | last post by:
hai all, i want to become a good programmer. one of my friends ( named "arnuld", he posts here infrequently), taught me Lisp. so i am not a programming beginner. i have heard these 2 points....
18
by: firewoodtim | last post by:
I need some help in furthering my education in OOP. I have developed a set of PHP scripts that I use in a fairly sophisticated database driven website, but I am not proud of the rather amateurish...
12
by: Srdja123 | last post by:
Like the topic says, I want to learn a language, but which should I learn? Which language will be mostly used in the future? C++ or C#?
1
by: Max2006 | last post by:
Hi, Is there any guide explains how to calculate the hardware requirement for an application? I am looking for a way to have a rough estimate how much CPU power and RAM do I need for the...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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...
0
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...
0
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...
0
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,...

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.