473,378 Members | 1,699 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,378 software developers and data experts.

how relevant is C today?

Because of my 'novice-ness' in programming, I had always thought that C
was replaced by C++ and wasn't really used anymore today. I know that's
not the case at all now, but I'm still curious how much C is used
anymore in programming today, and what purpose it serves. Is it used for
actual application programming, or is its use more for something like
extending Python? Would it help for a newbie to learn C for any reason?
Apr 8 '06 #1
45 1701
John Salerno wrote:
Because of my 'novice-ness' in programming, I had always thought that C
was replaced by C++ and wasn't really used anymore today. I know that's
not the case at all now, but I'm still curious how much C is used
anymore in programming today, and what purpose it serves. Is it used for
actual application programming, or is its use more for something like
extending Python? Would it help for a newbie to learn C for any reason?


My impression is that C++ hasn't managed to replace C, and that it isn't
used that much for new projects; of course, there is tons of existing
C++ code.

I think John Ousterhout's distinction of System programming vs.
Scripting languages isn't that bad, after all. C is used heavily
for System programming, and will not be replaced there for a foreseeable
future: operating systems, programming languages, web servers, database
servers, etc. OTOH, application programming is done in Java, Python,
C#, Ruby, ... C++ is used both for system programming and applications.

As for *learning* the languages: never learn a language without a
specific inducement. If you know you are going to write a Python
extension, an Apache module, or a Linux kernel module in the
near future, start learning C today. If you don't know what you
want to use it for, learning it might be a waste of time, as
you won't know what to look for if you don't have a specific project
in mind.

Regards,
Martin
Apr 8 '06 #2
Hi John
Because of my 'novice-ness' in programming, I had always thought that C
was replaced by C++ and wasn't really used anymore today. I know that's
not the case at all now, but I'm still curious how much C is used
anymore in programming today, and what purpose it serves.
There is a whole spectrum of 'mixing' between features of
C ans C++ used today in the industry and thats o.k. if it
just works. You cal write plain C in a C++ environment,
mix some C++ features to your otherwise plain C and
so on - as you like.

You can't compare C/C++'industrial use w/Python's in todays
Software production - there is no match.

A recent 580+ people survey (O'Reilly) brought up the following:
http://www.onlamp.com/pub/a/onlamp/2...ts.html?page=2

"The Dice" (find tech jobs) has offerings
(last 7 days, U.S. + unrestricted) for:
*SQL 14,322
C/C++ 11,968
Java 10,143
...
Perl 3,332
PHP 730
*Python* 503
Fortran 119
Ruby 108
open*gl 66

That is what the industry looks for.
You understand the ratios?
... Is it used for
actual application programming, or is its use more for something like
extending Python? Would it help for a newbie to learn C for any reason?


It is used for almost everything, from
- Programming the Python Language itself,
- Programming the Perl Language itself,
- Programming the PHP language and others,
to
- complete Applications, as you said.

It *is* somehow 'wordy' (especially C), but
don't underestimate its power in the hands
of a master ;-)

There is a huge amount of highly
functional libraries for almost
everything too.

Regards,

M.
Apr 8 '06 #3
> "The Dice" (find tech jobs) has offerings
(last 7 days, U.S. + unrestricted) for:
*SQL 14,322
C/C++ 11,968
Java 10,143
...
Perl 3,332
PHP 730
*Python* 503
Fortran 119
Ruby 108
open*gl 66


Can anyone shed some light on the secret of Java? How is it that they
are so high on this list?
Apr 8 '06 #4
"Daniel Nogradi" <no*****@gmail.com> writes:
Can anyone shed some light on the secret of Java? How is it that they
are so high on this list?


Marketing? Hype? :-)

--
Jorge Godoy <go***@ieee.org>

"Quidquid latine dictum sit, altum sonatur."
- Qualquer coisa dita em latim soa profundo.
- Anything said in Latin sounds smart.
Apr 8 '06 #5
Mirco Wahab <wa***@chemie.uni-halle.de> writes:
"The Dice" (find tech jobs) has offerings
(last 7 days, U.S. + unrestricted) for:
*SQL 14,322
C/C++ 11,968
Java 10,143
...
Perl 3,332
PHP 730
*Python* 503
Fortran 119
Ruby 108
open*gl 66

That is what the industry looks for.
You understand the ratios?


Of course! You need 23 C/C++ people to do the job of one Pythoneer ;-)

--
Jorge Godoy <go***@ieee.org>

"Quidquid latine dictum sit, altum sonatur."
- Qualquer coisa dita em latim soa profundo.
- Anything said in Latin sounds smart.
Apr 8 '06 #6

On Apr 8, 2006, at 6:35 PM, Jorge Godoy wrote:
Mirco Wahab <wa***@chemie.uni-halle.de> writes:
"The Dice" (find tech jobs) has offerings
(last 7 days, U.S. + unrestricted) for:
*SQL 14,322
C/C++ 11,968
Java 10,143
...
Perl 3,332
PHP 730
*Python* 503
Fortran 119
Ruby 108
open*gl 66

That is what the industry looks for.
You understand the ratios?


Of course! You need 23 C/C++ people to do the job of one
Pythoneer ;-)

--
Jorge Godoy <go***@ieee.org>

+1 QOTW

Dave

Apr 8 '06 #7
John Salerno enlightened us with:
Because of my 'novice-ness' in programming, I had always thought that C
was replaced by C++ and wasn't really used anymore today.


C is used in many, many programs. The Linux kernel is perhaps one of
the best known. IIRC Apache is written inC too. The default Python
implementation too, of course.

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
Frank Zappa
Apr 9 '06 #8
C/C++ is used for a lot of things and not going anywhere.

I recommend you learn it not because you should create applications in
C or C++, but because it will increase your skills and value as a
programmer. I recommend you even spend a few weeks with an assembly
language, for the same reason.

However, when it comes to beginning new things with an eye for getting
the job done, C/C++ (or Java for that matter...) is usually a bad idea.
That having been said, there are always exceptions to the rule and
you'll learn better how to call things as you advance your skills as a
programmer.

There are also sometimes parts of your application that just cannot be
optimized any more in a high level language, and might benefit from
being converted to C or C++. But do yourself a favor and only do such
things after taking careful measurements and exhausting other options.
Many time consuming algorithms don't gain a noticable speed improvement
in lower level languages.

-Sandra

Apr 9 '06 #9
Martin v. Löwis wrote:
As for *learning* the languages: never learn a language without a
specific inducement. If you know you are going to write a Python
extension, an Apache module, or a Linux kernel module in the
near future, start learning C today. If you don't know what you
want to use it for, learning it might be a waste of time, as
you won't know what to look for if you don't have a specific project
in mind.


Your message makes me sad, as if I heard someone say "never read a book
without a specific inducement; if you know someone is going to ask you
about the book, start reading it today, but if you don't know what you
are going to use the book for, reading it will be a waste of time."

Programming languages are intellectual achievements and you can learn a
lot every time you study a new one (provided it is different enough from
the ones you already know.) Even if you don't have an immediate project
in mind, learning a new programming language can mean learning a new
style of programming, or at least a new way of looking at computer
science. That is worthwhile even if you get no immediate use from the
new language.
Apr 9 '06 #10
On 2006-04-08, Martin v. Löwis <ma****@v.loewis.de> wrote:
As for *learning* the languages: never learn a language
without a specific inducement.
That's silly. Learning (weather a computer language, a natural
language, or anything else) is never a bad thing. The more
languages you know, the more you understand about languages in
general. Learning languages is like any other skill: the more
you do it, the better you get at it.
If you know you are going to write a Python extension, an
Apache module, or a Linux kernel module in the near future,
start learning C today. If you don't know what you want to use
it for, learning it might be a waste of time, as you won't
know what to look for if you don't have a specific project in
mind.


Geeze, when I think of all the things I've "wasted my time"
learning.

--
Grant Edwards grante Yow! Kids, don't gross me
at off... "Adventures with
visi.com MENTAL HYGIENE" can be
carried too FAR!
Apr 9 '06 #11
Grant Edwards wrote:
On 2006-04-08, Martin v. Löwis <ma****@v.loewis.de> wrote:
As for *learning* the languages: never learn a language
without a specific inducement.


That's silly. Learning (weather a computer language, a natural
language, or anything else) is never a bad thing. The more
languages you know, the more you understand about languages in
general. Learning languages is like any other skill: the more
you do it, the better you get at it.


I don't exactly see why this is a contradiction. "Specific inducement"
does not necessarily mean that you have to have an external cause to
learn a language -- be it your job or whatever. Nobody hinders you from
creating that inducement yourself. It's just very hard to properly learn
a language without having an idea what to do with it (in fact, I have
seen people interested to learn programming utterly fail in doing so
because they had absolutely no clue what to program).
If you know you are going to write a Python extension, an
Apache module, or a Linux kernel module in the near future,
start learning C today. If you don't know what you want to use
it for, learning it might be a waste of time, as you won't
know what to look for if you don't have a specific project in
mind.


Geeze, when I think of all the things I've "wasted my time"
learning.


Well, how many languages have you learnt without writing anything in them?

Cheers,

Carl Friedrich Bolz

Apr 9 '06 #12
John Zenger wrote:
Your message makes me sad, as if I heard someone say "never read a book
without a specific inducement; if you know someone is going to ask you
about the book, start reading it today, but if you don't know what you
are going to use the book for, reading it will be a waste of time."


Ah. I wasn't actually talking about reading a C book. I was talking
about learning the programming language. You should, of course, read
a book about C - but I don't believe you can learn to program C by
just reading a book (or any other programming language, for that
matter). You will read the book, and might be able to *read* C programs
afterwards. To be able to write them, you need practice, and, for
that, you need a specific inducement.

Regards,
Martin
Apr 9 '06 #13
Grant Edwards wrote:
As for *learning* the languages: never learn a language
without a specific inducement.
That's silly. Learning (weather a computer language, a natural
language, or anything else) is never a bad thing. The more
languages you know, the more you understand about languages in
general. Learning languages is like any other skill: the more
you do it, the better you get at it.


Learning a language (whether a natural or a programming language)
needs practice, both for reading and for writing. Natural languages
are often taught under the guidance of a teacher, to make sure
the student gets the practice she needs.

In my experience, you won't learn a programming language
effectively if you don't get practice (in particular, in writing
programs - although reading them might even require *more*
practice, especially for C). And, people often don't practice
enough (either a natural language, nor a programming language)
if they don't have a specific goal in mind what they want to
learn the language for.
Geeze, when I think of all the things I've "wasted my time"
learning.


That's everybody's choice, of course. If you enjoy programming
languages on their own merits, you won't need further motivation.
However, then you don't post to a newsgroup "should I learn
this language", but you just go ahead and do it.

Regards,
Martin

Apr 9 '06 #14
Carl Friedrich Bolz wrote:
I don't exactly see why this is a contradiction. "Specific inducement"
does not necessarily mean that you have to have an external cause to
learn a language -- be it your job or whatever. Nobody hinders you from
creating that inducement yourself. It's just very hard to properly learn
a language without having an idea what to do with it (in fact, I have
seen people interested to learn programming utterly fail in doing so
because they had absolutely no clue what to program).


This is my experience also.

Regards,
Martin
Apr 9 '06 #15
Carl Friedrich Bolz wrote:
I don't exactly see why this is a contradiction. "Specific inducement"
does not necessarily mean that you have to have an external cause to
learn a language -- be it your job or whatever. Nobody hinders you from
creating that inducement yourself. It's just very hard to properly learn
a language without having an idea what to do with it (in fact, I have
seen people interested to learn programming utterly fail in doing so
because they had absolutely no clue what to program).


This is my experience also.

Regards,
Martin
Apr 9 '06 #16
Sandra-24 wrote:
C/C++ is used for a lot of things and not going anywhere.

I recommend you learn it not because you should create applications in
C or C++, but because it will increase your skills and value as a
programmer. I recommend you even spend a few weeks with an assembly
language, for the same reason.


"Back in the day" we wrote _way_ too much in assembly language, often
simply because there was no other language capable of doing, for example
an assembly language. C has replaced assembly language for most of an
operating system. In the SIGPLAN conference where C was first publicly
introduced, a later talk began with the speaker, who was talking about
his new portable macro system, said, "Everyone at this conference
should find out about 'C', it makes this work obsolete."

What C has as virtues are simple clear semantics, an obvious map to the
machine code representing each language feature, a language simple
enough to "read through to the machine" in the sense that you can read
a C program and not have a little section in the pure language take
a surprising amount of time ("no surprise delays"), and you can express
most of the bag of tricks assembly language programmers used at the time
to write their operating systems, compilers, .... One other immense
difference in C was that the language had very few "magic" functions
(setjmp and longjmp are the obvious bits-o-magic). For the most part,
the entire library could be written in the language "C" itself.
Further, there was a clear mapping between assembly language and C;
you could write a function in assembly that could be called from C,
and there was so little "necessary infrastructure" that you could
also write a function in C that could be called from assembly.

C can express neither exceptions nor coroutines (nor their fancy cousin,
continuations), which could be and were expressed in assembly. Nor does
C provide memory management. A few library functions give you some
primitives to roll your own, but garbage collection is out of the
question (despite Hans Boehm), because the language does not carry
enough infrastructure to find type information through introspection.

In exchange for these losses, the C programmer can write code that
executes in response to an external signal and yet does not create a
total hash of the internal memory structures. That kind of thing is
important in an OS, and something few languages (including C++) can do.
If you intend to study C++, study C first (it is easier to grasp), as
almost everything you learn in C can be used in C++. C++ is a "big"
language, while C is a "small" one; it will take much longer to "know"
C++ even though C++ started with the goal of being "C with objects."
If you are interested in languages, reading "the Design and Evolution
of C++" is a great base; it explains how C++ got the way it is from its
initial design goals.

--Scott David Daniels
sc***********@acm.org
Apr 9 '06 #17
Martin v. Löwis wrote:
As for *learning* the languages: never learn a language without a
specific inducement. If you know you are going to write a Python
extension, an Apache module, or a Linux kernel module in the
near future, start learning C today. If you don't know what you
want to use it for, learning it might be a waste of time, as
you won't know what to look for if you don't have a specific project
in mind.


I don't know if I completely agree with you, but I definitely understand
your point. I started learning C# for no reason, just because I'm
interested in programming. A year later, I never really used it much
because I didn't have a reason to. Now I've moved on to Python
(actually, I was going to start learning Python a while ago, but I was
afraid it would interfere with learning C#). So here I am now thinking
about C, but I also don't want it to interfere with Python.

I like Python and want to stick with it, which is why I'm desperately
looking fore exercises and puzzles so I can use it. It's just that I
obessively like to learn new things, and I keep moving on to new
subjects once I've 'learned' something well enough. I know Python well
enough, but for no real reason, so I think I'm going to stick with it
and keep using it, because it's fun.
Apr 9 '06 #18
How Relevant is C Today? I still need it for Writing!
--
Regards,
Casey
Apr 9 '06 #19
Hi John
It's just that I obessively like to learn new things,
and I keep moving on to new subjects once I've 'learned'
something well enough.
Ha!

So learn 'Perl' then - you'll never ever
get over this point ... ;-))

And if you, against all odds, think you
master it now - zongggg, a new Perl Version
with completely new syntax shows up ...
I know Python well enough, but for no real reason, so I think I'm
going to stick with it and keep using it, because it's fun.


At which level in the 'python challenge' did
you get stuck - and why?

Regards

M.
Apr 9 '06 #20
Hi Scott

your summary looks very concise and
good to read. I'd like to make some
minor additions,
C can express neither exceptions nor coroutines (nor their fancy cousin,
continuations), which could be and were expressed in assembly. Nor does
C provide memory management. A few library functions give you some
primitives to roll your own, but garbage collection is out of the
question (despite Hans Boehm), because the language does not carry
enough infrastructure to find type information through introspection.
So, al-imho, C 'abstracts out' some consistent
'von-Neumann' or 'Harvard-' machine from any
architecture where its ported to. And that
is - imho - the main strength of C.

It covers well most machine code vs. C instruction mapping (~1:1),
and RAM storage vs. coressponding data representation (1:1),
as you said partially.

It can't handle any aspect beyond these simple
mappings in its language core, this is where
more complex bulding blocks (libraries) will
come into play.
In exchange for these losses, the C programmer can write code that
executes in response to an external signal and yet does not create a
total hash of the internal memory structures. That kind of thing is
important in an OS, and something few languages (including C++) can do.
If you intend to study C++, study C first (it is easier to grasp), as
almost everything you learn in C can be used in C++. C++ is a "big"
language, while C is a "small" one; it will take much longer to "know"
C++ even though C++ started with the goal of being "C with objects."
If you are interested in languages, reading "the Design and Evolution
of C++" is a great base; it explains how C++ got the way it is from its
initial design goals.


I would say, from my own experience, that you wouldn't
use all C++ features in all C++ projects. Most people
I know would write C programs 'camouflaged' as C++,
that is: write clean & simple C - and use some C++
features e.g, class bound methods for interfaces -
but no inheritance at all (use compound objects) and
no exceptions (handle errors 'the olden way').

Regards

M.
Apr 9 '06 #21
Mirco Wahab wrote:

I would say, from my own experience, that you wouldn't
use all C++ features in all C++ projects. Most people
I know would write C programs 'camouflaged' as C++,
that is: write clean & simple C - and use some C++
features e.g, class bound methods for interfaces -
but no inheritance at all (use compound objects) and
no exceptions (handle errors 'the olden way').


Of course. C++ is a hybrid language by design, not only an object
oriented language, not only a language with exceptions, not only a
language with compile time metaprogramming etc.

You don't have to use all the features of C++ to make a real C++
program. Even for writing C programs, C++ is still a better choice (in
my opinion). If you want to, you can keep things "simple", and plain
C-ish, and still benefit from better type safety etc.

In my everyday work, I am forced to use a C90 only compiler, and
everyday I miss some C++ feature that wouldn't make my program any more
complex, quite the opposite. These are features like "const", no default
extern linkage, more typesafe enums etc. You can put upon yourself to
program in a C style, but whenever you miss something, you can always
wrap that up behind an abstraction such as a class etc., and still
maintain C-like semantics.

Say I wanted an Ada-like integer type that only runs from 1 to 100. I
could make such a beast in C++, and then use it just as an ordinary int
in my C style program. I could even make this beast _be_ an ordinary int
in release builds when I was sure (yeah right) that the code was
bugfree. This gives expressibility and preciseness in specification. You
let the compiler do the work for you. And you still maintain
performance. You can't do this in C at all. And there are a million more
examples.

In practice, the combination of Python and C++ covers most of what I
need to do in most situations. But I still wish that C++ offered a lot
more of those zero-overhead features that it might as well offer, that
the compiler just as well can do. It could learn from Ada in this regard.

/David
Apr 9 '06 #22
Mirco Wahab wrote:
At which level in the 'python challenge' did
you get stuck - and why?


Ugh, don't remind me! :)

I'm stuck on level 12, which is yet another image processing puzzle. I'm
getting tired of those, and I think it's really a shame that there is a
reliance on image puzzles rather than simply doing some coding to figure
out an algorithm, for example. (I really enjoyed writing my own function
to figure out the Morris sequence.)

Level 11 was an image puzzle that I flat-out cheated on to move forward,
and now here I am again at 12, another complex image puzzle, and I can't
find the answer for it. If anyone feels like emailing me with the
solution, I certainly won't be offended. :)

I just hope that later puzzles stop relying on PIL and start requiring
that you do some real coding with other modules, or even with just the
core language itself.
Apr 9 '06 #23
Here are a few languages I recommend most programmers should at least
have a peek at:

1) Smalltalk - The original object oriented programming language.
Influenced anything from Mac/Windows GUI to Java language. Terse, clean
syntax. IDE rolled into an operating system rolled into a set of core
libraries.
2) Lisp - Along with FORTRAN, one of the oldest programming languages
still in use. Pure functional programming model that is extensible and
has many derivatives. Great for mathematical purposes. Easy to learn if
you can get past all of the nested parenthesis :-)
3) C - The "Latin" of modern programming languages. Used in low level
tasks (e.g. - hardware drivers) as well as larger projects (e.g. -
operating systems and other programming languages). Logcal, explicit
flow albeit a bit wordy.

I have worked in C and Smalltalk for awhile now and just starting to
pickup Lisp. Knowing different languages can help you approach problems
with a fresh perspective. I prefer to code in Ruby and Python but can
use these languages a certain way given the angles I have picked up
elsewhere...

Apr 10 '06 #24
In article <11**********************@u72g2000cwu.googlegroups .com>,
"gregarican" <gr*********@gmail.com> wrote:
Here are a few languages I recommend most programmers should at least
have a peek at:

1) Smalltalk - The original object oriented programming language.
Influenced anything from Mac/Windows GUI to Java language. Terse, clean
syntax. IDE rolled into an operating system rolled into a set of core
libraries.
2) Lisp - Along with FORTRAN, one of the oldest programming languages
still in use. Pure functional programming model that is extensible and
has many derivatives. Great for mathematical purposes. Easy to learn if
you can get past all of the nested parenthesis :-)
3) C - The "Latin" of modern programming languages. Used in low level
tasks (e.g. - hardware drivers) as well as larger projects (e.g. -
operating systems and other programming languages). Logcal, explicit
flow albeit a bit wordy.

I have worked in C and Smalltalk for awhile now and just starting to
pickup Lisp. Knowing different languages can help you approach problems
with a fresh perspective. I prefer to code in Ruby and Python but can
use these languages a certain way given the angles I have picked up
elsewhere...


I would add to that list PostScript. Most people think of it as just
format for print files, but it's a a real general-purpose programming
language, and a cool one at that (with an clear similarity to FORTH). The
stack-based paradigm can be a bit mind bending if you're not used to it,
but bending your mind is the whole point of learning something new.
Apr 10 '06 #25
Ray

John Salerno wrote:
At which level in the 'python challenge' did
you get stuck - and why?


Ugh, don't remind me! :)

I'm stuck on level 12, which is yet another image processing puzzle. I'm
getting tired of those, and I think it's really a shame that there is a


This is EXACTLY why I am still stuck on level 12 for many months. The
first few ones are fun. That sequence thing is also particularly fun.

But after a while, it seems that it's an image after image after image
after image. I just got sick of PIL :)

<snip>

Apr 10 '06 #26
In article <44***********************@dreader2.cybercity.dk >,
David Rasmussen <da*************@gmx.net> wrote:
In my everyday work, I am forced to use a C90 only compiler, and
everyday I miss some C++ feature that wouldn't make my program any more
complex, quite the opposite. These are features like "const", no default
extern linkage, more typesafe enums etc.


"const" is in C89/C90. As for the others, how about hiding a copy of GCC
somewhere, just to use to preflight your code before actually building
it with your compulsory broken compiler? :)
Apr 10 '06 #27
In article <ma***************************************@python. org>,
"Daniel Nogradi" <no*****@gmail.com> wrote:
Can anyone shed some light on the secret of Java?


Java and C#/CLR I class as "instant-software-bloat-just-add-water"
technologies. That is, they are very popular in corporate circles, where
the users don't get to choose what software they're running.
Apr 10 '06 #28
Lawrence D'Oliveiro <ld*@geek-central.gen.new_zealand> writes:
"const" is in C89/C90.


Although with slightly different semantics from in C++... For
instance:

static const int n = 5;
double a[n];

is valid C++, but not valid C.
--
Thomas Bellman, Lysator Computer Club, Linköping University, Sweden
"When C++ is your hammer, everything ! bellman @ lysator.liu.se
looks like a thumb." ! Make Love -- Nicht Wahr!
Apr 10 '06 #29
Daniel Nogradi wrote:
"The Dice" (find tech jobs) has offerings
(last 7 days, U.S. + unrestricted) for:
*SQL 14,322
C/C++ 11,968
Java 10,143
...


Can anyone shed some light on the secret of Java? How is it that they
are so high on this list?


Sun invented a roundabout strategy to enroll programmers to Java by
first attracting the attention of the Wall Street Journal with Hotjava,
and thus the attention of the programmers' management.
Apr 10 '06 #30
gregarican wrote:
Here are a few languages I recommend most programmers should at least
have a peek at:
(snip) 2) Lisp - Along with FORTRAN, one of the oldest programming languages
still in use. Pure functional programming model


Err... Even if Lisp is the father of functional programming, it is
definitively not a 'pure' FPL.
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"
Apr 10 '06 #31
bruno wrote:
Err... Even if Lisp is the father of functional programming, it is
definitively not a 'pure' FPL.


True. I couldn't referred to something like Haskell as being pure FP.
My bad :-)

Apr 10 '06 #32

gregarican wrote:
1) Smalltalk - The original object oriented programming language.
Influenced anything from Mac/Windows GUI to Java language.


No. Simula is the "original object oriented programming language".

Apr 10 '06 #33
Ray wrote:
John Salerno wrote:
At which level in the 'python challenge' did
you get stuck - and why?

Ugh, don't remind me! :)

I'm stuck on level 12, which is yet another image processing puzzle. I'm
getting tired of those, and I think it's really a shame that there is a


This is EXACTLY why I am still stuck on level 12 for many months. The
first few ones are fun. That sequence thing is also particularly fun.

But after a while, it seems that it's an image after image after image
after image. I just got sick of PIL :)

<snip>


And it is surprisingly difficult to find solutions anywhere! People
really want to keep them a secret! :)
Apr 10 '06 #34
Hi,

It is very hard to avoid C in embedded/low-level/industrial programming.

Philippe

John Salerno wrote:
Because of my 'novice-ness' in programming, I had always thought that C
was replaced by C++ and wasn't really used anymore today. I know that's
not the case at all now, but I'm still curious how much C is used
anymore in programming today, and what purpose it serves. Is it used for
actual application programming, or is its use more for something like
extending Python? Would it help for a newbie to learn C for any reason?


Apr 10 '06 #35
gregarican wrote:
Here are a few languages I recommend most programmers should at least
have a peek at:

1) Smalltalk - The original object oriented programming language.
Influenced anything from Mac/Windows GUI to Java language. Terse, clean
syntax. IDE rolled into an operating system rolled into a set of core
libraries. Simula actually is the "original o-o language (as Smalltalk's authors
freely admit).
2) Lisp - Along with FORTRAN, one of the oldest programming languages
still in use. Pure functional programming model that is extensible and
has many derivatives. Great for mathematical purposes. Easy to learn if
you can get past all of the nested parenthesis :-) The functional style is not what was unique to LISP. LISP was the first
language whose behavior was fully specified before it was implemented
(and that definition was completely machine-independent).
3) C - The "Latin" of modern programming languages. Used in low level
tasks (e.g. - hardware drivers) as well as larger projects (e.g. -
operating systems and other programming languages). Logcal, explicit
flow albeit a bit wordy.


--Scott David Daniels
sc***********@acm.org
Apr 10 '06 #36
Rune wrote:
No. Simula is the "original object oriented programming language".


Thanks for pointing this out. I had read about references to Simula but
never looked beyond the term itself. Interesting stuff. Especially
since it was developed so long ago. Very interesting...

Apr 10 '06 #37
Lawrence D'Oliveiro wrote:
In article <44***********************@dreader2.cybercity.dk >,
David Rasmussen <da*************@gmx.net> wrote:
In my everyday work, I am forced to use a C90 only compiler, and
everyday I miss some C++ feature that wouldn't make my program any more
complex, quite the opposite. These are features like "const", no default
extern linkage, more typesafe enums etc.
"const" is in C89/C90.


Broken const is. C++ const is different from C90 const.
As for the others, how about hiding a copy of GCC
somewhere, just to use to preflight your code before actually building
it with your compulsory broken compiler? :)


I can't do that. I compile for a special system with loads of special
libraries. The code can never compiler on a stock gcc compiler. Besides,
it doesn't help me to better and more precisely express notions in my code.

/David
Apr 10 '06 #38
Thomas Bellman wrote:
Lawrence D'Oliveiro <ld*@geek-central.gen.new_zealand> writes:
"const" is in C89/C90.


Although with slightly different semantics from in C++... For
instance:

static const int n = 5;
double a[n];

is valid C++, but not valid C.


There are other differences as well. In C, I can't do something like:

int f(void)
{
return 42;
}

const int i = f()

int main()
{
return 0;
}

/David
Apr 10 '06 #39
In article <44***********************@news.free.fr>,
bruno at modulix <on***@xiludom.gro> wrote:
gregarican wrote:
Here are a few languages I recommend most programmers should at least
have a peek at:

(snip)
2) Lisp - Along with FORTRAN, one of the oldest programming languages
still in use. Pure functional programming model


Err... Even if Lisp is the father of functional programming, it is
definitively not a 'pure' FPL.


It _can_ be used as a pure functional language. An interpreter for a
pure-functional subset of LISP can be written in functional LISP, in
just a couple of dozen lines of code.
Apr 11 '06 #40
In article <ro***********************@reader1.panix.com>,
Roy Smith <ro*@panix.com> wrote:
I would add to that list PostScript. Most people think of it as just
format for print files, but it's a a real general-purpose programming
language, and a cool one at that (with an clear similarity to FORTH).
Having used both PostScript (a lot) and FORTH (a little), let me say
that their similarities are more superficial and their differences more
subtle. FORTH has a definite compilation step prior to interpretation,
whereas PostScript is very much a purely-interpreted language. A quick
illustration of some differences:

FORTH you love if honk then

vs

PostScript you love {honk} if
The
stack-based paradigm can be a bit mind bending if you're not used to it,
but bending your mind is the whole point of learning something new.


Even after you learn it, the stack-based paradigm is very easy to get
into trouble with. I started putting diagram comments in my PostScript
code, to remind myself of the state of the stack at various points.
Unfortunately it didn't have very good local variables, which would have
helped avoid overuse of the stack.
Apr 11 '06 #41
In article <e1**********@news.lysator.liu.se>,
Thomas Bellman <be*****@lysator.liu.se> wrote:
Lawrence D'Oliveiro <ld*@geek-central.gen.new_zealand> writes:
"const" is in C89/C90.


Although with slightly different semantics from in C++... For
instance:

static const int n = 5;
double a[n];

is valid C++, but not valid C.


enum
{
n = 5,
};
double a[n];

works in C.
Apr 11 '06 #42
Lawrence D'Oliveiro wrote:
In article <44***********************@news.free.fr>,
bruno at modulix <on***@xiludom.gro> wrote:

gregarican wrote:
Here are a few languages I recommend most programmers should at least
have a peek at:


(snip)
2) Lisp - Along with FORTRAN, one of the oldest programming languages
still in use. Pure functional programming model


Err... Even if Lisp is the father of functional programming, it is
definitively not a 'pure' FPL.

It _can_ be used as a pure functional language. An interpreter for a
pure-functional subset of LISP can be written


And ?

--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'on***@xiludom.gro'.split('@')])"
Apr 11 '06 #43
bruno wrote:
Err... And ?


It's the snide, curt replies such as your recent ones in this thread
that reinforce the generalization that the Python community can be
rude.

Apr 11 '06 #44
gregarican wrote:
bruno wrote:

Err...


And ?

It's the snide, curt replies such as your recent ones in this thread
that reinforce the generalization that the Python community can be
rude.


I'm afraid you're right, at least for the second one, and I do apologise

NB : the fist one didn't seem offensive to me, but english's not my
first language so I may have missed some subtility - if so, please
consider this message as applying to both.
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"
Apr 11 '06 #45
bruno at modulix <on***@xiludom.gro> writes:
Lawrence D'Oliveiro wrote:
It _can_ be used as a pure functional language. An interpreter for a
pure-functional subset of LISP can be written


And ?


You will have a functionally pure dialect of a very useful language
that makes it impossible to write pretty much anything of use :)

Although if you do manage to get something working, it's pretty much
guaranteed to work correctly due to the fact to purely functional
programs being very close to mathematical proofs...at least in theory
and assuming your language has no bugs. Imperative programming is
mathematics with state; functional programming *is* mathematics.

--
burton samograd kruhft .at. gmail
kruhft.blogspot.com www.myspace.com/kruhft metashell.blogspot.com
Apr 11 '06 #46

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

Similar topics

7
by: Vinnie Davidson | last post by:
Hello! I'm trying to get all records from my SQL Server Database with "DeadlineDate" = today (not today - 24 hours). All records has a field called "DeadlineDate", and the date is stored in...
1
by: Damien Ramsey | last post by:
hello there Info: I have a form on which is displayed information, customer code, address and balance etc.. on that form i also have start of the current week, which is displaying 29th march...
2
by: tshad | last post by:
I am trying to check the date of my field to check if it is greater that today, but I am getting an error. I am using : <asp:CompareValidator runat="server"...
4
by: Chris | last post by:
Hello, I am attempting to build a MS SQL query that will return data from "today"; today being current day 8:00AM-10:00PM today. My goal is to return the data from a table that is written to...
1
by: dmbkiwi | last post by:
I'm using the dateutil module from http://labix.org/python-dateutil. Am I right in thinking that the rrules module doesn't acknowledge days before today? An example of the issue: >>>...
7
by: joeyej | last post by:
How do I compare today's date with this string (in my inc file) so that I can set an alert if date choice i.e. May 15, 2006 not at least greater than two days from current date? <option...
5
by: M Skabialka | last post by:
I am creating my first Visual Studio project, an inventory database. I have created a form and used written directions to add data from a table to the form using table adapters, data sets, etc. ...
3
by: Paulo | last post by:
http://www.microsoft2.net/
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.