Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help!: What prgrming Lang. should I Learn???

9 views
Skip to first unread message

Daniel Richardson

unread,
Aug 2, 1997, 3:00:00 AM8/2/97
to

I would like to start learning how to program computers and I have no
idea what language to learn first. I would eventually like to be able to
write programs that would help me solve problems in astronomy, physics,
and math. I learned BASIC when I was a little kid, but that was a while
back - and basic isn't practical for writing the types of programs that I
want to write.
Any suggestions on what programing language would be the best for me to
start learning with?
Thanks!
*******************************************************************************
Daniel Richardson
dri...@tiger.lsu.edu
*******************************************************************************


John Popelish

unread,
Aug 2, 1997, 3:00:00 AM8/2/97
to Daniel Richardson

Daniel Richardson wrote:

* I would like to start learning how to program computers and I have no
* idea what language to learn first. I would eventually like to be able
to
* write programs that would help me solve problems in astronomy,
physics,
* and math. I learned BASIC when I was a little kid, but that was a
while
* back - and basic isn't practical for writing the types of programs
that I
* want to write.
* Any suggestions on what programing language would be the best for me
to
* start learning with?
* Thanks!
*
*************************************************************************
* Daniel Richardson
* dri...@tiger.lsu.edu
*
*************************************************************************

What kind of programs are you interested in writing? I think you will
find that Qbasic that comes with bMicrosoft 5 and beyond is a much more
complete language than what you might have used in school. What is the
limit of Basic for what you have in mind?

AES

unread,
Aug 2, 1997, 3:00:00 AM8/2/97
to

In article <Pine.A41.3.95.970802...@tiger3.ocs.lsu.edu>,
Daniel Richardson <dri...@tiger3.ocs.lsu.edu> wrote:

> I would like to start learning how to program computers and I have no

> idea what language to learn first. I would eventually like to be able to

> write programs that would help me solve problems in astronomy, physics,

> and math. I learned BASIC when I was a little kid, but that was a while

> back - and basic isn't practical for writing the types of programs that I

> want to write.


> Any suggestions on what programing language would be the best for me to

> start learning with?
> Thanks!
>
*******************************************************************************
> Daniel Richardson
> dri...@tiger.lsu.edu
>
*******************************************************************************

Mathematica -- it's what the vast majority of scientists, engineers, and
science and engineering students now use, or will eventually use, for
these purposes.

(I'm not particularly praising Mathematica in saying this; it has a number
of things not to like. I'm just being realistic. Mathematica is, for
practical purposes, the Excel or the MS Word of technical computing.)

Joseph C. Bahm

unread,
Aug 2, 1997, 3:00:00 AM8/2/97
to Daniel Richardson

Well, I am learning both Pascal and C for Dos right now. I don't know how
to program in windoes, but I am trying to find some resources to learn
that as well. I have also had a little experience with Basic. I can tell
you from my experience with Pascal and C that they should be able to do
what it is you want them for. I would be happy to get you started in
either or both. Just email me and tell me if your interested.


JOseph C. Bahm (also Joseph C. Lininger)
jb...@concentric.net (jb...@cris.com)
Check out my home page on the world wide web:
http://www.concentric.net/~jbahm/

Note, I do have other E-mail addresses. You may receive a reply from this
address if you sent mail to any of them. For a complete listing all of my
alternate E-mail addresses, see my alternate addresses page on the world
wide web at:
http://www.concentric.net/~jbahm/altadr.shtml


On Sat, 2 Aug 1997, Daniel Richardson wrote:

> I would like to start learning how to program computers and I have no
> idea what language to learn first. I would eventually like to be able to
> write programs that would help me solve problems in astronomy, physics,
> and math. I learned BASIC when I was a little kid, but that was a while
> back - and basic isn't practical for writing the types of programs that I
> want to write.
> Any suggestions on what programing language would be the best for me to
> start learning with?
> Thanks!
> *******************************************************************************
> Daniel Richardson
> dri...@tiger.lsu.edu
> *******************************************************************************
>
>
>

A quote for you curtacy of the unix fortune program.
You can learn many things from children. How much patience you have,
for instance.
-- Franklin P. Jones


Dean Krekos

unread,
Aug 3, 1997, 3:00:00 AM8/3/97
to

Well, Im a Computer Engineering student graduating next semester, and C has
worked fine for any kind of programming that you could want to do in Math or
Physics. I have written programs for two Engineering mathematics classes,
Numerical Analysis and Applications of Computer Methods. C is good enough for
all of it. If you really want to do some stuff, you can usually find functions
or modules or whatever out on the Net, from functions that do derivatives to
fast Fourier Transfors. You can even buy math functions from commercial
vendors. I think one of the companies is RogueWave Software, but Im not quite
sure. Anyway you get the idea. Just do some searches on mathematics and
physics, youll come across lots of stuff if you spend just a little bit of time
looking. If you dont know how to program, you probably will want to start with
something like Pascal. Spend some time with that and then move up to C. I would
wait until you have a good idea of what goes on in C before moving to C++.
Hope that helps.
Dean Krekos

James Giles

unread,
Aug 3, 1997, 3:00:00 AM8/3/97
to


Daniel Richardson <dri...@tiger3.ocs.lsu.edu> wrote in article
<Pine.A41.3.95.970802...@tiger3.ocs.lsu.edu>...


> I would like to start learning how to program computers and I have no
> idea what language to learn first. I would eventually like to be able to
> write programs that would help me solve problems in astronomy, physics,
> and math. I learned BASIC when I was a little kid, but that was a while
> back - and basic isn't practical for writing the types of programs that I
> want to write.
> Any suggestions on what programing language would be the best for me to
> start learning with?

For scientific and numerical work, Fortran is still the best
widely available language. However, since the demand is
less than for other languages, the compilers are likely to
be more expensive (assuming you have to buy your own).

I think you'll find that modern Basic is not as primitive as
your memory of it suggests. Pascal is another good choice,
though it has some restrictions that some people object to.

The only reason to consider C/C++ is that it's as about
as portable as syphilis. There are no valid technical
reasons for choosing C. But the cheap, wide availability
of the compilers, and the faddish popularity of the
language will guarantee plenty of support and other
users around to help out. Many modern operating
systems are brain-damaged enough to provide easy
access to system-level operations only from C.

--
J. Giles
Ricercar Software

Alicia Carla Longstreet

unread,
Aug 3, 1997, 3:00:00 AM8/3/97
to Joseph C. Bahm

Joseph C. Bahm wrote:

> Well, I am learning both Pascal and C for Dos right now. I don't know how
> to program in windows, but I am trying to find some resources to learn
> that as well.

You can find a free C compiler for Windows win32s at:
Lcc-win32s
http://www.geocities.com/SiliconValley/Heights/9069/index.html
or:
Gcc or Win32s
http://www.cygnus.com/misc/gnu-win32/



> On Sat, 2 Aug 1997, Daniel Richardson wrote:

> > I would like to start learning how to program computers and I have no
> > idea what language to learn first. I would eventually like to be able to
> > write programs that would help me solve problems in astronomy, physics,
> > and math. I learned BASIC when I was a little kid, but that was a while
> > back - and basic isn't practical for writing the types of programs that I
> > want to write.
> > Any suggestions on what programing language would be the best for me to
> > start learning with?

> > Thanks!

C.
You can find a free C compiler for 32 bit Extended DOS at:
DJGPP port of Gnu C - Gcc
http://www.delorie.com

You can find a free C compiler for Windows win32s at:
Lcc-win32s
http://www.geocities.com/SiliconValley/Heights/9069/index.html
or:
Gcc or Win32s
http://www.cygnus.com/misc/gnu-win32/

--
*********************************************************
* Alicia Carla Longstreet ca...@ici.net *
* Supporter of the campaign against grumpiness on c.l.c *
*********************************************************
The habit of viewing things cheerfully,
and of thinking of life hopefully,
may be made to grow up in us like any other habit.
Matthew Arnold

Doug Lo

unread,
Aug 3, 1997, 3:00:00 AM8/3/97
to Daniel Richardson

Daniel,

I recommend you to learn C, and then learn OO programming languages,
such as C++ or JAVA...etc.

Regards,
Doug.

Daniel Richardson wrote:
>
> I would like to start learning how to program computers and I have no
> idea what language to learn first. I would eventually like to be able to
> write programs that would help me solve problems in astronomy, physics,
> and math. I learned BASIC when I was a little kid, but that was a while
> back - and basic isn't practical for writing the types of programs that I
> want to write.
> Any suggestions on what programing language would be the best for me to
> start learning with?
> Thanks!

Henry Baker

unread,
Aug 3, 1997, 3:00:00 AM8/3/97
to

In article <Pine.A41.3.95.970802...@tiger3.ocs.lsu.edu>,
Daniel Richardson <dri...@tiger3.ocs.lsu.edu> wrote:

> I would like to start learning how to program computers and I have no
> idea what language to learn first. I would eventually like to be able to
> write programs that would help me solve problems in astronomy, physics,
> and math. I learned BASIC when I was a little kid, but that was a while
> back - and basic isn't practical for writing the types of programs that I
> want to write.
> Any suggestions on what programing language would be the best for me to
> start learning with?

Since this is sci.math, I would strongly suggest learning one of the
variants of Lisp, perhaps Scheme. Most versions of Scheme nowadays have
infinite precision integers as well as an excellent library of the more
usual floating point functions. Common Lisp has an even more extensive
built-in library.

Ralph Jay Frisbie

unread,
Aug 3, 1997, 3:00:00 AM8/3/97
to

Daniel Richardson wrote:
>
> I would like to start learning how to program computers and I have no
> idea what language to learn first. I would eventually like to be able to
> write programs that would help me solve problems in astronomy, physics,
> and math. I learned BASIC when I was a little kid, but that was a while
> back - and basic isn't practical for writing the types of programs that I
> want to write.
> Any suggestions on what programing language would be the best for me to
> start learning with?
> Thanks!
> *******************************************************************************
> Daniel Richardson
> dri...@tiger.lsu.edu
> *******************************************************************************

I've now seen enough replies posted to your original question that I'm
sure
you now know less than you did before. The many languages that exist
each have
strengths and weaknesses, yet almost any of them are capable of solving
almost any
problem. Although I've already posted to you a response pushing my
favorite
language, the best answer probably is: what language is being used by
people
around you (so you can get help). What language is used by your most
likely
employers? (if you can determine that)
I don't think you can possibly get a fair comparison of languages via
the newsgroups, since a language choice is about the same as a religious
choice:
their are many zealots who will assure you that their way is the
ONLY way!

--
_______________________________
| Ralph Jay Frisbie |
| |
| a saucer lover, |
| but not the inventor! |
| |
| rfri...@vcnet.com |
| 805-671-9989 |
|______________________________|

Ralph Jay Frisbie

unread,
Aug 3, 1997, 3:00:00 AM8/3/97
to

Daniel Richardson wrote:
>
> I would like to start learning how to program computers and I have no
> idea what language to learn first. I would eventually like to be able to
> write programs that would help me solve problems in astronomy, physics,
> and math. I learned BASIC when I was a little kid, but that was a while
> back - and basic isn't practical for writing the types of programs that I
> want to write.
> Any suggestions on what programing language would be the best for me to
> start learning with?
> Thanks!
> *******************************************************************************
> Daniel Richardson
> dri...@tiger.lsu.edu
> *******************************************************************************
Pascal is an excellent language which is now out of style, cannot

recommend any variant of it. I do not wish to start any C/Fortran

flames, but

I'm an old Fortranner and feal it's an excellent choice for an applied

scientist's

first language.

Now, as to variants of Fortran. There are free versions of F77 ,

commercial

versions of F77 and F90, and two subset versions of F90. Fortran 90

(F90) is a very

major uprgrade/change from F77. Full F90 actually contains F77 as a

subset!

Since F90 is now (imho) huge, cumbersome, and laden with all of

Fortran's errors,

as well as strengths, since 1955 - I suggest one of the subset

compilers,

F from http://www.imagine1.com/imagine1

ELF90 from http://www.lahey.com

F is available free for Linux, a student version for Win95/NT is $100

with

documentation.

ELF90 is availabe free for Windows, but about $100 with full

documentation.

These are both excellent versions. They delete all of the obsolete

features of F90, retaining only the modern desirabel ones. I use F to

teach

an introductory Fortran class to lower division students at the local

college.

Marc Wachowitz

unread,
Aug 3, 1997, 3:00:00 AM8/3/97
to

Daniel Richardson wrote:
> Any suggestions on what programing language would be the best for me to
> start learning with? [for astronomy, physics, and math]

It's not clear what kind of programming you want to do in those fields (e.g.
lots of frequently changing experimental programs to be thrown away soon,
vs. reusable libraries of complicated high-performance implementations for
well-known algorithms), and different requirements of that kind may make
different languages more appropriate than others. If you like extensive
compile-time checking and good support both for abstractions and to achieve
decent performance, Ada may be worth looking at. I guess you'll find some
experts from your field of interest on the newsgroup comp.lang.ada, who
could tell you more specifically where the design of Ada could be helpful
for your needs.

A lot of information about Ada is available at
http://www.adahome.com/

GNAT, an Ada compiler for many operating systems, is freely available from
http://www.gnat.com/

-- Marc Wachowitz <m...@ipx2.rz.uni-mannheim.de>

William Docter

unread,
Aug 3, 1997, 3:00:00 AM8/3/97
to

Daniel Richardson wrote:
>
> I would eventually like to be able to write programs that would
> help me solve problems in astronomy, physics, and math. Any
> suggestions on what programing language would be the best for
> me to start learning with?

If this is not an attempt to start a holy war I don't know what is. To
pose such a question on any particular language's newsgroup would invite
numerous responses that mostly favor that particular language, but to
cross-post it on EVERY language's newsgroup is to invite nothing but
mindless quarreling about whos language is best. It is like asking if
it is better to learn English or Japan? If you live in the US, you
better learn English, but if you live in Japan ...



Ralph Jay Frisbie wrote:

> I've now seen enough replies posted to your original question that I'm
> sure you now know less than you did before.

flame(){
Anyone who would crosspost this kind of question deserves whatever they
get
}

I'll add my 2 cents and advocate Matlab, C, C++, and Fortran since all
can make calls to each others subroutines with a little work and all
have extensive mathematical/scientific libraries.

--
William Docter
Chemical Process Modeling and Control Research Center
Lehigh University Department of Chemical Engineering
http://www.lehigh.edu/~wad2

David Ullrich

unread,
Aug 3, 1997, 3:00:00 AM8/3/97
to

James Giles wrote:
> [...]

> Pascal is another good choice,
> though it has some restrictions that some people object to.

What restrictions would those be? And are they restrictions
in the language or in particular implementations? I guess what
I'm really wondering if you're familiar with Borland's latest
version of TurboPascal - they're calling it Object Pascal and
shipping it in a package called Delphi.

Meant as an actual question - I don't feel at all
"restricted" in OP, hence my curiosity whether I just don't
realize how restricted I actually am. So: what restrictions
do you mean?

> The only reason to consider C/C++ is that it's as about
> as portable as syphilis. There are no valid technical
> reasons for choosing C. But the cheap, wide availability
> of the compilers, and the faddish popularity of the
> language will guarantee plenty of support and other
> users around to help out. Many modern operating
> systems are brain-damaged enough to provide easy
> access to system-level operations only from C.

--
David Ullrich

?his ?s ?avid ?llrich's ?ig ?ile
(Someone undeleted it for me...)

David Ullrich

unread,
Aug 3, 1997, 3:00:00 AM8/3/97
to

Ralph Jay Frisbie wrote:
> [...]

> Pascal is an excellent language which is now out of style, cannot
>
> recommend any variant of it.


What's your complaint with Borland's latest (that would be
Object Pascal / Delphi 3.0)? Seriously - my experience is very limited
here, I'm wondering whether I just don't know what I'm missing or
what.

Dan Evens

unread,
Aug 3, 1997, 3:00:00 AM8/3/97
to

Daniel Richardson wrote:
> Any suggestions on what programing language would be the best for me to
> start learning with?

In academia it's FORTRAN and C for scientific computing. In industry, it
depends how up-to-date the company is whether it is FOTRAN, C, or C++.
Dan Evens

James Giles

unread,
Aug 3, 1997, 3:00:00 AM8/3/97
to


David Ullrich <ull...@math.okstate.edu> wrote in article
<33E4D4...@math.okstate.edu>...


> James Giles wrote:
> > [...]
> > Pascal is another good choice,
> > though it has some restrictions that some people object to.
>
> What restrictions would those be? And are they restrictions
> in the language or in particular implementations? I guess what
> I'm really wondering if you're familiar with Borland's latest
> version of TurboPascal - they're calling it Object Pascal and
> shipping it in a package called Delphi.

Conventional Pascal forces you to declare things in a strict
order - which Borland's Pascal loosened up on. Conventional
Pascal treated the array size as part of its type (you can't write
routines which could do array manipulations on various sizes
of arrays) - I don't recall whether Borland retains that restriction.
Then there are issues like separate compilation, pointers to things
not on the heap, having to declare labels, etc.. Borland Pascal
may or may not retain these and other difficulties, I simply don't
know. Indeed, the later (and poorly advertised) ANSI Pascal
standard may have relaxed some of these itself. Who has
a copy of the standard?

Anyway, you missed my point. I was *recommending* Pascal as
a first language. Even with all the above problems - perhaps
because of some of them - it provides a good, clean introduction
to computing without bizarre syntax or wierd semantics. It was,
after all, designed as a language for teaching computing.

Another language that might make a good first language is
Turing (from the University of Toronto). It shares with Pascal
the drawback of few supported versions extant.

Serious students of computing should also learn Lisp, a functional
language such as Haskell, and a *pure* object oriented language
like SmallTalk. With that background, the student is then prepared
to meet C/C++ on a sound footing (you *have* to learn them
eventually, unfortunately).

Rick Decker

unread,
Aug 3, 1997, 3:00:00 AM8/3/97
to

David Ullrich wrote:
>
> Ralph Jay Frisbie wrote:
> > [...]
> > Pascal is an excellent language which is now out of style, cannot
> >
> > recommend any variant of it.

Pascal is indeed an excellent language. In spite of its admitted lack
of popularity, I'd still recommend it. In light of what we've learned
in the past twenty years, though, it is getting a little long in the
tooth.
>
David goes on to ask:

> What's your complaint with Borland's latest (that would be
> Object Pascal / Delphi 3.0)? Seriously - my experience is very limited
> here, I'm wondering whether I just don't know what I'm missing or
> what.
>

You're not missing much. Object-oriented programming is a powerful and
useful paradigm. The latest incarnations of Pascal support this
technique
at least as well as C++. The answer to the question, "what language
should I learn" depends on the answer to "what do I intend to do with
it."
If you want to write programs for other people, write them in C or C++.
You might even consider FORTRAN, if you're trying to catch engineers
who are more interested in getting results than in being part of the
language du jour. If you want results and aren't interested in
a language, a previous response suggested Mathematica--you could do
worse.
If you want to have fun, try Java, but realize that it's not for
everyone.

The bottom line depends on your intent:

Solve problems for my own use: Mathematica, Maple, or a similar package.

Solve problems and learn a marketable skill: FORTRAN, C, C++, or Java.

Learn how to program, solve problems, get the job done, have fun, don't
worry about my marketability. Object Pascal, Objective C, Smalltalk
[entering duck and run mode here, I know].

Learn how to program, solve problems, get the job done, have fun, take a
chance on marketability: Java. [Again, entering duck and run mode.]


Regards,

Rick

-----------------------------------------------------
Rick Decker rde...@hamilton.edu
Department of Comp. Sci. 315-859-4785
Hamilton College
Clinton, NY 13323 = != == (!)
-----------------------------------------------------

Ralph Jay Frisbie

unread,
Aug 3, 1997, 3:00:00 AM8/3/97
to

David Ullrich wrote:
>
> Ralph Jay Frisbie wrote:
> > [...]
> > Pascal is an excellent language which is now out of style, cannot
> >
> > recommend any variant of it.
>
> What's your complaint with Borland's latest (that would be
> Object Pascal / Delphi 3.0)? Seriously - my experience is very limited
> here, I'm wondering whether I just don't know what I'm missing or
> what.
>
> --
> David Ullrich
>
> ?his ?s ?avid ?llrich's ?ig ?ile
> (Someone undeleted it for me...)

I recommended against Pascal purely because it is out of style.
You've identified the only compiler I'm aware of, so while the
price is right for Borland, the selection is limited. Now, I happen
to think that Pascal is out of style for two reasons:
1. It requires more typing than that thing between B and D
2. It requires more care in design and permits fewer tricks
than the above.

au...@imap2.asu.edu

unread,
Aug 4, 1997, 3:00:00 AM8/4/97
to

: * I would like to start learning how to program computers and I have no
: * idea what language to learn first. I would eventually like to be able
: to
: * write programs that would help me solve problems in astronomy,
: physics,
: * and math. I learned BASIC when I was a little kid, but that was a
: while
: * back - and basic isn't practical for writing the types of programs
: that I
: * want to write.
: * Any suggestions on what programing language would be the best for me
: to
: * start learning with?
: * Thanks!

More fuel for the fire!

If you already know some "basic" then I would probably advise
learning some basic "Pascal" before moving on to "C". Pascal is
increasingly uncommon in 'professionally' written programming but it is
an excellent starter language that lets you play with a lot of the
concepts and see some quick results (I myself started on 'C', got lost,
and went back to do Pascal, then was able to approach C confidently).

Fortran is getting less and less common, though there is still a
lot of stuff out there. The future of government programming appears to
be C,C++ etc. If you want to be seriously involved in computer
programming in the future this is what you had better learn. Pascal is
still found on some smaller projects, especially PC oriented. The new
"visual basic" (and older "Rocky mountain" version) pops up now and then,
but I doubt it will great inertia in the scientific community. Lisp has
some very nifty capabilities for scientific types, but the government is
very leery of non-procedural languages.
Unless you want to do hardware oriented programming, particularly
on aircraft etc. -- then don't do Ada. The Air Force Science Advisory
board has advised dumping it, and though it has some tremendous inertia
built up with the metal eaters it will probably dissappear in another
decade (though who knows, COBOL is still with us!).

So if you are interested in government work I'd advise learning
C,C++ and family via whatever path you take. That and the Unix operating
system in some flavor. Truth be known, if you do a good job learning one
procedural language -- you can usually pick up new ones without too great
a problem. IMHO

regards,

-------------------------------------------------------------------
Steven j Forsberg at au...@imap2.asu.edu Wizard 87-01

Bernhard Messerer

unread,
Aug 4, 1997, 3:00:00 AM8/4/97
to rde...@hamilton.edu

Rick Decker wrote:

> David Ullrich wrote:
> >
> > Ralph Jay Frisbie wrote:
> > > [...]
> > > Pascal is an excellent language which is now out of style,
> cannot
> > >
> > > recommend any variant of it.
>

> Pascal is indeed an excellent language. In spite of its admitted lack
>
> of popularity, I'd still recommend it. In light of what we've
> learned
> in the past twenty years, though, it is getting a little long in the
> tooth.
> >
> David goes on to ask:

> > What's your complaint with Borland's latest (that would be
> > Object Pascal / Delphi 3.0)? Seriously - my experience is very
> limited
> > here, I'm wondering whether I just don't know what I'm missing or
> > what.
> >

Think that it is stupid to answer such questions like fighting a holy
war: The problem is not the one who asks but those who answer!But, to
say one (maybe) useful thing: I think a big problem with PASCAL is that
there is no standard for it: Everybody creates his own dialect (okay, on
Win32 only Borland is left) and everything you can do with PASCAL can be
achieved with C(++) too, those two languages (C and PASCAL) are quite
similar I think, don#t know object PASCAL

Messi


jo...@bellatlantic.net

unread,
Aug 4, 1997, 3:00:00 AM8/4/97
to

On Sun, 03 Aug 1997 13:50:43 -0400, William Docter <wa...@lehigh.edu>
wrote:

>Daniel Richardson wrote:
>>
>> I would eventually like to be able to write programs that would
>> help me solve problems in astronomy, physics, and math. Any

>> suggestions on what programing language would be the best for

>> me to start learning with?
>

It has nothing to do with what language you choose.Finding a way to
turn what you want to do into computer language or any language is the
part you should focus on. Once you learn 1 language you will find that
they are all basically the same.

Philippe Langevin

unread,
Aug 4, 1997, 3:00:00 AM8/4/97
to

You are a beginer who want to solve simple mathematical problems, so
the choice of the langage has an importance.

I really think the best thing is to begin with any Pascal. First reason
is the syntaxe of the langage. Second reason, generally the compiler of
this langage really help the beginner. Which is not the same thing with
other (popular) langages.

Note that mathematica, or mapple can be enough if you do not really
want to learn Programming.


Philippe Langevin

_______
| | | Universite de Toulon et du Var
| G | E | Groupe d'Etude du Codage de Toulon
|___|___| B.P. 132, 83957 LA GARDE CEDEX
| | | TEL: 94.14.20.55 FAX: 94.14.24.79
| C | T | E-MAIL: lang...@univ-tln.fr
|___|___| URL: http://www.univ-tln.fr/~langevin/

Alicia Carla Longstreet

unread,
Aug 4, 1997, 3:00:00 AM8/4/97
to

jo...@bellatlantic.net wrote:

> On Sun, 03 Aug 1997 13:50:43 -0400, William Docter <wa...@lehigh.edu>
> wrote:

> >Daniel Richardson wrote:

> >> I would eventually like to be able to write programs that would
> >> help me solve problems in astronomy, physics, and math. Any
> >> suggestions on what programing language would be the best for
> >> me to start learning with?

> It has nothing to do with what language you choose.Finding a way to
> turn what you want to do into computer language or any language is the
> part you should focus on. Once you learn 1 language you will find that
> they are all basically the same.

Well then maybe he should focus on learning BASIC. There are many
differences betwween languages:

FORTRAN - FORmula TRANslation; This is a language designed for heavy
duty math.
COBOL - COmmon Business Oriented Language; The name says it all.
C - Designed as a Systems Programming Language also designed to be
portable.
Pascal - Designed as a Teaching Language, this is highly structured.
BASIC - Beginners All-purpose Symbolic Instruction Code; Another
language designed for teaching.

Basic and Pascal have both evolved to become reasonably decent
languages, in their own right, but they both sho their roots.

C has evolved into an excellent general purpose language. C child, C++
is also an excellent general purpose language. Both C and C++ share a
common heritage, but please remember they are two different languages.
It is almost as easy to learn Delphi (Object Oriented Pascal), when you
know C as it is to learn C++ (almost).

Nevertheless, C is one of the most widely used and available languages
available today. If you are into math, physics, astronomy, etc. you
will, most likely, be working with Unix/Linux workstations (No Delphi,
sorry). Most likely you should learn FORTRAN, but C will also get the
job done (maybe not as fast), I would learn both (I did).

Dave Monroe

unread,
Aug 4, 1997, 3:00:00 AM8/4/97
to

Daniel Richardson wrote:
>
> I would like to start learning how to program computers and I have no
> idea what language to learn first. I would eventually like to be able to

> write programs that would help me solve problems in astronomy, physics,
> and math. I learned BASIC when I was a little kid, but that was a while
> back - and basic isn't practical for writing the types of programs that I
> want to write.

> Any suggestions on what programing language would be the best for me to
> start learning with?
> Thanks!
> *******************************************************************************
> Daniel Richardson
> dri...@tiger.lsu.edu
> *******************************************************************************

Crunching numbers is traditionally done in Fortran, but good math
libraries are available for most languages.

If you're interested in being employable, learn C and/or C++. There's
also quite a large market for Cobol programmers. I learned Cobol first
(yes, I know, Cobol sucks as a language).

A good, portable, toolbox language is Perl. There is also a pretty good
market for people that can write Perl scripts. You might find Perl's
pattern matching features really useful if you're combing through raw
data.

My $.02.

--
David S. Monroe David....@cdc.com
Software Engineer
Control Data Systems
2970 Presidential Drive, Suite 200
Fairborn, Ohio 45324
(937) 427-6385

Alicia Carla Longstreet

unread,
Aug 4, 1997, 3:00:00 AM8/4/97
to

Bernhard Messerer wrote:

> Think that it is stupid to answer such questions like fighting a holy
> war: The problem is not the one who asks but those who answer!But, to
> say one (maybe) useful thing: I think a big problem with PASCAL is that
> there is no standard for it: Everybody creates his own dialect (okay, on
> Win32 only Borland is left) and everything you can do with PASCAL can be
> achieved with C(++) too, those two languages (C and PASCAL) are quite
> similar I think, don't know object PASCAL

Pascal was designed as a teaching language. Of the versions of Pascal I
have seen, the most useful is Deplhi. Unfortunately it is limited as
the the platforms it runs on (Windows 3.x with win32s, Windows 95,
Windows NT,a nd OS/2) rather useless for someone who is very likely to
be working on a Unix or Linux workstation.

Let's be realistic, he needs a language available on one of the high end
workstations (Sun, SGI, IBM, HP, etc) and they just don't usually run
Windows et. al.. They run Unix. Therefore he needs a language that
runs on Unix.

Question: Any decent versions of Pascal for Unix?
Question: Any decent versions of BASIC for Unix
And, if so, how oare they fixed for doing extremely complex math?
He needs a language for doing very comples math:
COBOL is definately OUT.
BASIC is OUT (IMO)
Pascal is not quite there.
C will do the trick.
C++ will do the trick, albeit a bit slower.
FORTRAN will get you there quickest.

Good Luck, Good Programming, and Have fun!

Mike Rubenstein

unread,
Aug 4, 1997, 3:00:00 AM8/4/97
to

jo...@bellatlantic.net wrote:

> On Sun, 03 Aug 1997 13:50:43 -0400, William Docter <wa...@lehigh.edu>
> wrote:
>

> >Daniel Richardson wrote:
> >>
> >> I would eventually like to be able to write programs that would

> >> help me solve problems in astronomy, physics, and math. Any

> >> suggestions on what programing language would be the best for
> >> me to start learning with?
> >
>

> It has nothing to do with what language you choose.Finding a way to
> turn what you want to do into computer language or any language is the
> part you should focus on. Once you learn 1 language you will find that
> they are all basically the same.

Somehow I get the impression that you have never tried numerically
solving differential equations in RPG. :-)

Michael M Rubenstein

David Ullrich

unread,
Aug 4, 1997, 3:00:00 AM8/4/97
to

Alicia Carla Longstreet wrote:
> [...]

> Pascal was designed as a teaching language.

so?

> Of the versions of Pascal I
> have seen, the most useful is Deplhi. Unfortunately it is limited as
> the the platforms it runs on (Windows 3.x with win32s, Windows 95,
> Windows NT,a nd OS/2) rather useless for someone who is very likely to
> be working on a Unix or Linux workstation.

Well that's certainly a valid concern - I was just curious
whether our complaints with the current Object Pascal were all of this
sort or whether there were fundamental flaws in the design of the
language itself that I was overlooking.
The language is really Object Pascal, Delphi is the IDE they
packaged it in. There's no reason that either one couldn't exist for
UNIX, etc, but no, at present it's just Windows.

In fact you more or less state that Delphi runs on OS/2.
If you're talking about native OS/2 as opposed to OS/2 running
Windows versions of Delphi this is big news to me - ???


> Let's be realistic, he needs a language available on one of the high end
> workstations (Sun, SGI, IBM, HP, etc) and they just don't usually run
> Windows et. al.. They run Unix. Therefore he needs a language that
> runs on Unix.
>
> Question: Any decent versions of Pascal for Unix?
> Question: Any decent versions of BASIC for Unix
> And, if so, how oare they fixed for doing extremely complex math?
> He needs a language for doing very comples math:
> COBOL is definately OUT.
> BASIC is OUT (IMO)
> Pascal is not quite there.
> C will do the trick.
> C++ will do the trick, albeit a bit slower.
> FORTRAN will get you there quickest.

--
David Ullrich

?his ?s ?avid ?llrich's ?ig ?ile
(Someone undeleted it for me...)

David Ullrich

unread,
Aug 4, 1997, 3:00:00 AM8/4/97
to

Ralph Jay Frisbie wrote:
>
> David Ullrich wrote:
> >
> > Ralph Jay Frisbie wrote:
> > > [...]
> > > Pascal is an excellent language which is now out of style, cannot
> > >
> > > recommend any variant of it.
> >
> > What's your complaint with Borland's latest (that would be
> > Object Pascal / Delphi 3.0)? Seriously - my experience is very limited
> > here, I'm wondering whether I just don't know what I'm missing or
> > what.[...]

>
> I recommended against Pascal purely because it is out of style.
> You've identified the only compiler I'm aware of, so while the
> price is right for Borland, the selection is limited. Now, I happen
> to think that Pascal is out of style for two reasons:
> 1. It requires more typing than that thing between B and D
> 2. It requires more care in design and permits fewer tricks
> than the above.

Oh dear - I meant to be just asking what you meant, didn't
mean to get religious, but now I can't help but insert a teensy bit
of zealotry: I wouldn't know C from a hole in the ground. But there
exist lots of Delphi guys who used to be C++ guys, who claim that
all that nasty typing actually speeds things up for them, because
of all the errors they find immediately. (Of course there are
other possible explanations for this phenomenon that I'd just as
soon not go into...)

Mike METCALF

unread,
Aug 4, 1997, 3:00:00 AM8/4/97
to

In article <Pine.A41.3.95.970802...@tiger3.ocs.lsu.edu>,
dri...@tiger3.ocs.lsu.edu says...

>
> I would like to start learning how to program computers and I have no
>idea what language to learn first. I would eventually like to be able to

>write programs that would help me solve problems in astronomy, physics,
>and math. I learned BASIC when I was a little kid, but that was a while
>back - and basic isn't practical for writing the types of programs that I
>want to write.
> Any suggestions on what programing language would be the best for me to
>start learning with?
> Thanks!
>*****************************************************************************
**
>Daniel Richardson

Give F a try - the student version is free. More details are to be found in
the June issue of ACM SIGPLAN, or on wwwinfo.cern.ch/~metcalf/SIG.html.

Happy computing.

Mike Metcalf


Ray Dillinger

unread,
Aug 4, 1997, 3:00:00 AM8/4/97
to

Daniel Richardson wrote:
>
> I would like to start learning how to program computers and I have no
> idea what language to learn first. I would eventually like to be able to
> write programs that would help me solve problems in astronomy, physics,
> and math.
,,,

> Any suggestions on what programing language would be the best for me to
> start learning with?
> Thanks!

Well, you're bound to get a ton of answers on this one. Everybody has a
favorite language, and everybody will tell you to use it. :-)

My favorite language is scheme (a LISP dialect). It's fairly easy to
learn,
pretty simple in terms of syntax, and does not suffer from the numeric
overflow problems so common with MOST other languages. (ie, if you want
to compute how many centimeters it is between two stars, or how many
light years between two galaxies, C code will usually give you a
spectacularly wrong answer unless you code your own mathematics routines
or are very careful about what numeric types you use to represent what).

Scheme's model of mathematics corresponds more closely to what a
scientist/
mathematician will expect than does the mathematics of most other
languages.
For example, when you divide an integer by an integer, you get a
rational
in scheme, a floating-point approximation to a rational in some
languages,
or an integer (!) in many languages including C.

Scheme is garbage collected, so you won't have to worry about loose
pointers and memory management. But right now it has no standard
methodology for creating libraries and GUI interfaces -- every
implementor brews their own. :-(

Common LISP is the other obvious choice; all of the things I pointed out
about scheme are also true of CL, except that it has standard functions
for
libraries and GUI interfaces, and its libraries are better developed in
general, but it also has some very weird (uh, that's my opinion only --
you
may find them quite natural, I guess) namespace conventions and it's
harder
to learn because its semantics are more complicated and restricted.

Bear

Patrick E. White

unread,
Aug 4, 1997, 3:00:00 AM8/4/97
to

> It has nothing to do with what language you choose.Finding a way to
> turn what you want to do into computer language or any language is the
> part you should focus on. Once you learn 1 language you will find that
> they are all basically the same.

Sorry, but I can't let this get away without a fight. This conclusion
can only be reached by a person who was a relatively limited exposure to
computer languages. I agree that C/C++/Pascal/Basic/Fortran/Ada are all
essentially equivalent -- heck, f2c (the fortran-c translator) would be
an impossible program to write if the languages weren't structually
compatible.

But these are all stack-based imperative programming languages. They are
completely different from the recursive, functional class which contains
Lisp/Scheme/Dylan. These languages are all based on recursive procedures
and the untyped lambda-calculus, and ideally should result in programs
which are modeled by the composition of mathematical functions. This is
completely different from the imperative style, in which the programs
tells the computer "do this, then this, then this..." The primary
control structures of imperative languages (for/while/do) don't even
exist in pure functional languages.

Then we have differences in typing. C is strongly typed. You tell the
computer "x is a double, y is and integer, z is a character". Lisp is
untyped -- everything is a "cons cell" which is just a generic container
for info. Then we have type-inference languages, like ML and CAML, which
evince yet another programming paradigm. In these functional languages,
you don't tell the computer what type anything is, it infers all types
from the code. These languages have one obvious advantage in that you
don't have to declare the type of every variable or worry about type
errors -- and one huge advantage in that they have been rigorously
proven to be "safe." That is, an ML program will _never_ crash your
computer. Ever. If it compiles, then it will never "core dump". This is
a nice feature. And programming with this feature requires a very
different mindset than programming in C or in LISP.

-Patrick

William Clodius

unread,
Aug 4, 1997, 3:00:00 AM8/4/97
to

Daniel Richardson wrote:
>
> I would like to start learning how to program computers and I have no
> idea what language to learn first. I would eventually like to be able to
> write programs that would help me solve problems in astronomy, physics,
> and math. I learned BASIC when I was a little kid, but that was a while
> back - and basic isn't practical for writing the types of programs that I
> want to write.
> Any suggestions on what programing language would be the best for me to
> start learning with?
> Thanks!
> *******************************************************************************
> Daniel Richardson
> dri...@tiger.lsu.edu
> *******************************************************************************

First you need to more clearly define your problem domain and goals.
Restricting yourself to astronomy, physics, and math is not sufficient.
Languages used in these domains include, but are not restricted to,
Fortran 77, Fortran 90, C, C++, Ada, Forth, Basic, Matlab, Mathcad, IDL,
PV-Wave, Scheme, Lisp, Pearl, Tcl, and Python. Things that can influence
your language choice include

1. Portabilility to a wide variety of systems: C is probably best here,
but Fortran, C++, Ada, Scheme, and Forth are also available on virtually
any system of interest. The proprietary languages Matlab, Mathcad, IDL,
and PV-Wave are available on fewer systems, but have more conisistent
interfaces and behavior on those systems, i.e., portability is more
clearly defined for such languages.

2. Interfacing to the OS. As most OS's currently define the API's in
terms of C. C/C++ are usually the simplest to interface. "Scripting"
languages such as Pearl, Tcl, and Python can also facilitate such
interfacing.

3. Interfacing to general purpose hardware, C/C+= is often a favorite
here, but Ada and Forth are also competitive.

4. One off routines that do not see significant reuse. In the scientific
arena such code often benefits from arry capabilities in the language.
Such array capabilities are often available in the proprietary
languages, e.g., Matlab, Mathcad, IDL, and PV-Wave, but are also
provided by Fortran 90 and its subsets F and ELF. The less well known
language Sisal is also usefull here, but is unfortunately unsupported by
its original developers. Code that doesn't depend on arrays might be
usefully written in a dynamic functional language, e.g., Scheme, Lisp,
or Haskell.

5. Code that is used often. Such code benefits from the efficiency gains
of compilation. In the area of numerics Fortran usually has the most
efficient compilers, but C and Ada are often competitive. The less well
known language Sisal is also usefull here, but is unfortunately
unsupported by its original developers. Some of the proprietary
languages have compilation available as an option.

6. Code that is widely shared among a team of programmers. I would argue
that a strong explicit typing system with a good module system is
usefull here and that Ada is probably the best language, followed by
Fortran 90 (or its subsets), some of the less well known functional
languages, C, or C++, in roughly that order.

7. Graphics. Generally graphics capabilities are more easilly provided
by the proprietary languages, although libraries (particularly
commercial libraries) can make the standardized languages competitive
here.

--

William B. Clodius Phone: (505)-665-9370
Los Alamos Nat. Lab., NIS-2 FAX: (505)-667-3815
PO Box 1663, MS-C323 Group office: (505)-667-5776
Los Alamos, NM 87545 Email: wclo...@lanl.gov

Edsko de Vries

unread,
Aug 4, 1997, 3:00:00 AM8/4/97
to

PowerBasic seems to be able to do _very_ fast calculations... Some people
even say that the NASA uses it. So, if this is true it would be the best
language for you, I think.
Maybe someone knows more about this?

James Giles

unread,
Aug 4, 1997, 3:00:00 AM8/4/97
to


Patrick E. White <wh...@mitre.org> wrote in article
<33E602...@mitre.org>...

> Sorry, but I can't let this get away without a fight. This conclusion
> can only be reached by a person who was a relatively limited exposure to
> computer languages. I agree that C/C++/Pascal/Basic/Fortran/Ada are all
> essentially equivalent -- heck, f2c (the fortran-c translator) would be
> an impossible program to write if the languages weren't structually
> compatible.

This is a little misleading. All Turing-equivalent languages are
mutually inter-translatable. How easy that is depends on the
available translation tools and the skill of the translators. At
present, *ALL* languages must be translated to machine code
in order to run. Since C is the closest (in form) to machine
code of all machine-independent languages, a translator
to C is easier (with the pre-existing tools and techniques)
than to other languages. Hence, it is common for new
experimental languages, and new attempts for widely
portable implementations of old languages to begin life
as preprocessors to C.

The problem with this is that C *isn't* machine code, so
it has none of the advantages (speed, complete use of
hardware capabilities, etc.) that a direct translation to
the target machine code would. So, new languages (and
new processors for old languages), if successful, eventually
move toward a direct native compiler for the most common
systems.

> But these are all stack-based imperative programming languages. They are
> completely different from the recursive, functional class which contains
> Lisp/Scheme/Dylan.

Yet these are also translatable to machine code, or they
wouldn't work. Indeed, some naive implementations that
translate to C have existed. These attempts were less
successful than, say, f2c only because the languages
that support were less successful than Fortran.

> Then we have differences in typing. C is strongly typed. You tell the
> computer "x is a double, y is and integer, z is a character". Lisp is
> untyped -- everything is a "cons cell" which is just a generic container
> for info. Then we have type-inference languages, like ML and CAML, which
> evince yet another programming paradigm. In these functional languages,
> you don't tell the computer what type anything is, it infers all types

> from the code. [...]

Yet these languages *have* type. Indeed they are usually
statically typed. That is, the type of everything is known at
compile time. Haskell (which reintroduces explicit type to
an ML base - but is also *purely* functional) is often referred
to as 'typefull'.

> [...] These languages have one obvious advantage in that you


> don't have to declare the type of every variable or worry about type
> errors -- and one huge advantage in that they have been rigorously
> proven to be "safe." That is, an ML program will _never_ crash your

> computer. [...]

That's an interesting claim. In a properly written system, no
user-level program can crash your computer. It can merely
operate 'incorrectly' itself. That is, no matter what its unintended
behavior is, the system should not go down. Since the system
only goes down because of its own flaws, I don't see that you
can claim that changing languages at the user-level will
prevent it.

> [...] Ever. If it compiles, then it will never "core dump". [...]

Which just means that the language designers chose not to
include 'core dumps' in the repertoire of responses to unintended
behavior in the code. I think the property that your referring to
is that the compiler doesn't accept any programs but those
which *might* be the possible intent of some hypothetical
user (though it might *not* be the intent of the user submitting
the code). In that sense, all programs which pass the compiler
are provably correct. This differs from conventional languages
in that most of them can successfully compile programs which
can never run (like setting a value to zero in one context and
dividing by that value somewhere else).

I don't see this as a particular advantage. I certainly don't
think the compiler should exercise any 'prior restraint' with
respect to certain possible errors. If I have a data item that's
read in at run-time and which is used as the divisor in a
numeric expression - I *prefer* that the program not do
time-consuming run-time checks to make sure it's not zero
(unless I code such checks explicitly myself). The hardware
will inform me of the problem soon enough and without any
additional overhead being imposed on correct input values.

William Clodius

unread,
Aug 4, 1997, 3:00:00 AM8/4/97
to

In my comments I forgot to mention languages used to solve problems in
symbolic algebra, i.e., Mathematica and Maple, which are also very
usefull for appropriate applications.

Gene W. Smith

unread,
Aug 4, 1997, 3:00:00 AM8/4/97
to

In article <Pine.A41.3.95.970802...@tiger3.ocs.lsu.edu>,
Daniel Richardson <dri...@tiger3.ocs.lsu.edu> wrote:

> I would like to start learning how to program computers and I have no
>idea what language to learn first. I would eventually like to be able to
>write programs that would help me solve problems in astronomy, physics,
>and math.

You would be musc better off learning to use a computer algebra system
staring with M, such as Maple, Mathematica, Macsyma, or Matlab. If you
don't like M there are even a few which start with other letters, such
as Reduce or Axiom.

Once you've learned one of these, you could learn a computer language,
if you really needed to. Which I doubt.

Gene W. Smith

unread,
Aug 4, 1997, 3:00:00 AM8/4/97
to

In article <siegman-0208...@aesmac.stanford.edu>,
AES <sie...@ee.stanford.edu> wrote:

>Mathematica -- it's what the vast majority of scientists, engineers, and
>science and engineering students now use, or will eventually use, for
>these purposes.

Give us a break. It's just one of a number of similar
programs. Moreover, in some areas Matlab is more common, while in
others Maple holds sway.

>(I'm not particularly praising Mathematica in saying this; it has a number
>of things not to like. I'm just being realistic. Mathematica is, for
>practical purposes, the Excel or the MS Word of technical computing.)

You need to get around more.

William Clodius

unread,
Aug 4, 1997, 3:00:00 AM8/4/97
to

James Giles wrote:
> <snip> Since C is the closest (in form) to machine

> code of all machine-independent languages, a translator
> to C is easier (with the pre-existing tools and techniques)
> than to other languages. Hence, it is common for new
> experimental languages, and new attempts for widely
> portable implementations of old languages to begin life
> as preprocessors to C.<snip>

Actually I suspect that the closeness of C to machine code has
relatively little to do with the (relatively) wide availability of
translators to C. Other factors that influence this are

1. The availability of tools such as Lex and Yacc that facilitate the
useage of C for this purpose.

2. The fact that many system API's are specified in terms of C. As the
language will need to interface to the system to some extent this part
of the language implementation is simplified by using C.

3. The wide availability of C compilers for the systems of greatest
interest, partly because almost all OS's currently are written in C.
This makes it appear to be easy to port a translator to C to many
systems. In practice the variability of compilers means that either the
gcc front end is used, or the porting task is more complicated than
originally expected. Also it is probably best to implement I/O (and a
few other highly machine specific functions) using machine specific
libraries.

4. The wide exposure of students and professional programmers to C means
that many find it to be a comfortable starting point.

Other languages that have seen wide useage as intermediate forms for
other language include Fortran, Lisp, Scheme, Pascal, and Ada.

Doug Lo

unread,
Aug 4, 1997, 3:00:00 AM8/4/97
to

Rick Decker wrote:
> Pascal is indeed an excellent language. In spite of its admitted lack
> of popularity, I'd still recommend it. In light of what we've learned
> in the past twenty years, though, it is getting a little long in the
> tooth.

Pascal is *Out-of-date* language. I strongly recommend C instead of
PASCAL.
C supports more mathematics functions rather than PASCAL.
If you've learned it,you can forward to learn object-oriented
programming
languages,such as C++,smalltalk,JAVA...etc.

Regards,
Doug.

Ralph Jay Frisbie

unread,
Aug 4, 1997, 3:00:00 AM8/4/97
to Daniel Richardson

Daniel Richardson wrote:
>
snip

> Any suggestions on what programing language would be the best for me to
> start learning with?
> Thanks!
> *******************************************************************************
> Daniel Richardson
> dri...@tiger.lsu.edu
> *******************************************************************************


I've been following the response tree your question has generated. I
imagine
you are reasonable confused by now, but maybe you've collected enough
comments to collate, edit, integrate, and publish a book.
One thing I haven't seen mentioned is that you cannot learn a computer
language without a significant amount of time writing and debugging
programs. Further, you really should get some constructive criticism/
feedback on the programs you generate. Bad programs can be written in
any language, so I'd suggest you obtain some feedback on style as
you progress.
Good luck, and if you choose Fortran or Pascal, I'll give you
email assistance if needed. (I teach introductory class in these at
the local college)

Raptor

unread,
Aug 4, 1997, 3:00:00 AM8/4/97
to

Daniel Richardson <dri...@tiger3.ocs.lsu.edu> writes:
> I would like to start learning how to program computers and I have no
>idea what language to learn first. I would eventually like to be able to
>write programs that would help me solve problems in astronomy, physics,
>and math. I learned BASIC when I was a little kid, but that was a while
>back - and basic isn't practical for writing the types of programs that I
>want to write.
> Any suggestions on what programing language would be the best for me to
>start learning with?
> Thanks!

You've gotten a lot of feedback, and I'll just add mine as a software
engineer with a decade of wide-ranging experience.

Choose between C and FORTRAN. FORTRAN is simpler, and is the more
solid number-cruncher, though barely. C is more full-featured and
powerful. Any program can be written in C. Not every program can
be written in FORTRAN.

You want to learn how to write good programs. That's code that's
clear and easy to follow, and efficient. There's too much bad
software in the world as it is, written by people who haven't learned
how to write good software. (I've seen more than my share of other
people's programming.)

It is easy to write bad software in both languages, as neither
enforces strict rules. C is a little better at this than FORTRAN.

I suggest you take a programming course, an introduction to either
C or FORTRAN. You'll be hard-pressed to find a course on FORTRAN
nowadays though. There's a good chance the instructor will impress
upon you the techniques of programming discipline.

If you choose FORTRAN, you'll spend less time learning how to program
but you will not be exposed to many of the more powerful features of
modern languages. C will be more complex and take more time to learn,
but once you learn it you'll be able to take advantage of all the
capabilities of the computer, and more easily migrate to other
languages if you so desire.

My suggestion is C. I've recently re-learned FORTRAN after
programming in C for ten years, and am annoyed at how limiting it is.
C is also more widely supported.

Don't take programming too lightly. It's probably going to be both
harder and easier to learn than you expect, and again I suggest you
learn how to write *good* programs. If you buy a book on "How to
program in [Your Language Here]", don't skip over the parts that talk
about structure, data naming, data type construction and commenting.
--
Lynn Wallace
I could never be a woman. I'd just sit around and play with my
breasts all day. (Steve Martin)
http://www.xmission.com/~lawall

Jakob Engblom

unread,
Aug 5, 1997, 3:00:00 AM8/5/97
to Gene W. Smith

Gene W. Smith wrote:
>
> In article <Pine.A41.3.95.970802...@tiger3.ocs.lsu.edu>,
> Daniel Richardson <dri...@tiger3.ocs.lsu.edu> wrote:
>
> I would like to start learning how to program computers and I have no
>idea what language to learn first. I would eventually like to be able to
>write programs that would help me solve problems in astronomy, physics,
>and math.
>

I believe that the best way to actually learn programming is to take
some university introductory course, where one learns (are forced to
use) concepts like data hiding, abstract data types, commenting and
think first ---code later.

The actual language IS irrelevant. Use whatever feels easy. Our favorite
here is ML, because it teaches strict typing and side-effect-free
programming.

Later one can learn languages like C and (shudder) Fortran.

For doing math, a math package is a good choice --- but no matter which,
you will want to learn PROGRAMMING first and LANGUAGES later. These are
two very different things. Just because you know cyrillic letters
doesn't mean you can produce good Russian literature... ;-)

Programming is an art, independent of the exact computer and language
used. Once learnt, it can be reapplied any number of times.

I learnt programming in BASIC/Assembler, and have since learnt to use OO
languages, a number of functional languages, PROLOG, Forth, and few
others (like C). They are fundamentally similar, but using different
styles.

Any decent computer science graduate should pick up a language is less
than two weeks. The best way to learn proramming is to study computer
science. I realize today just how little I knew when I came to the
university with 10 years of hands-on experience...

/jakob


--
--------------------------------------------------------------------
Jakob "Fepp" Engblom * Computer Science Student @ Uppsala University
--------------------------------------------------------------------
ja...@acm.org, ja...@docs.uu.se * www.docs.uu.se/~jakob
--------------------------------------------------------------------
BEST ANAGRAM OF MY NAME: ankle bomb jog

Olivier Marti

unread,
Aug 5, 1997, 3:00:00 AM8/5/97
to

In article (Dans l'article) <33e6c...@newsfeed.uu.se>, Jakob Engblom
<jakob@zapata*docs.uu.se> wrote (écrivait) :

> Gene W. Smith wrote:
> >
> > In article <Pine.A41.3.95.970802...@tiger3.ocs.lsu.edu>,
> > Daniel Richardson <dri...@tiger3.ocs.lsu.edu> wrote:

> > I would like to start learning how to program computers and I have no
> >idea what language to learn first. I would eventually like to be able to
> >write programs that would help me solve problems in astronomy, physics,
> >and math.

> The actual language IS irrelevant. Use whatever feels easy. Our favorite
> here is ML, because it teaches strict typing and side-effect-free
> programming.

>

> For doing math, a math package is a good choice --- but no matter which,
> you will want to learn PROGRAMMING first and LANGUAGES later. These are
> two very different things. Just because you know cyrillic letters
> doesn't mean you can produce good Russian literature... ;-)
>

s
The general direction given by Gene are correct : learn PROGRAMMING, in
any language. But maybe not *any* language.

To learn programming correctly, it is far easier to begin with a *high
level language*, with strong typing, fully structured, no side effects, no
ambiguity . So try Pascal, ML, maybe Fortran 90 (suppressing obsolete
features, like implicit typing ...), etc ... but avoid C, Fortran 77,
which are real mess.

With this languages, you will learn good habits, that you will never loose
when using raw low level languages.


Olivier

_____________________________________________________________
| Olivier MARTI mailto:olivie...@cea.fr |
| Laboratoire de Modelisation du Climat et de l'Environnement |
| C.E.A. Saclay, DSM/LMCE Bt 709, Tel: (33 1) 69 08 77 27 |
| 91191 Gif sur Yvette Cedex Fax: (33 1) 69 08 77 16 |
|_____________________________________________________________|

Rhombus

unread,
Aug 5, 1997, 3:00:00 AM8/5/97
to

I suggest that if he is going to be solving problems in Astronomy,
Physics and Mathematics, his major thrust will be numeric computations
rather than algebraic. For "number crunching," the most widely-used
languages are still Fortran and C. The former is much easier to learn
and can give useful results almost immediately. More complicated
languages can be learned later. Although I am an algebraist myself
(Algebraic Topology,) his objective is, after all, solving problems in
Physics & Mathematics (and that usually means DE's & Analysis.)

B.J. (Bryce) Brogan, Ph.D.
bro...@cadREMOVEMEvision.com
WARNING: SPAM ROBOTS NOW READ EMBEDDED SIGS

-----------------

On 4 Aug 1997 23:03:25 -0400, gws...@river.gwi.net (Gene W. Smith)
wrote:

Oleg Krivosheev

unread,
Aug 5, 1997, 3:00:00 AM8/5/97
to


Hi,

"James Giles" <james...@worldnet.att.net> writes:

>
>
>
> Daniel Richardson <dri...@tiger3.ocs.lsu.edu> wrote in article
> <Pine.A41.3.95.970802...@tiger3.ocs.lsu.edu>...


> > I would like to start learning how to program computers and I have no
> > idea what language to learn first. I would eventually like to be able to
> > write programs that would help me solve problems in astronomy, physics,

> > and math. I learned BASIC when I was a little kid, but that was a while
> > back - and basic isn't practical for writing the types of programs that I
> > want to write.
> > Any suggestions on what programing language would be the best for me to
> > start learning with?
>

> For scientific and numerical work, Fortran is still the best
> widely available language.

agree...

> However, since the demand is
> less than for other languages, the compilers are likely to
> be more expensive (assuming you have to buy your own).
>
> The only reason to consider C/C++ is that it's as about
> as portable as syphilis.

;););)

> There are no valid technical reasons for choosing C.

well, this is just wrong. There are TONS of
technical reasons to learn C for lots
of domain.

> But the cheap, wide availability
> of the compilers, and the faddish popularity of the
> language will guarantee plenty of support and other

plenty of support? well, very good technical reason...

> users around to help out. Many modern operating
> systems are brain-damaged enough to provide easy
> access to system-level operations only from C.

well, another quite good technical reason...

OK

Andrew Lynch

unread,
Aug 5, 1997, 3:00:00 AM8/5/97
to

Alicia Carla Longstreet wrote:
> Bernhard Messerer wrote:
[...]

> > achieved with C(++) too, those two languages (C and PASCAL) are quite
> > similar I think, don't know object PASCAL
>
> Pascal was designed as a teaching language. Of the versions of Pascal I

> have seen, the most useful is Deplhi. Unfortunately it is limited as
> the the platforms it runs on (Windows 3.x with win32s, Windows 95,
> Windows NT,a nd OS/2) rather useless for someone who is very likely to
> be working on a Unix or Linux workstation.
>
> Let's be realistic, he needs a language available on one of the high end
> workstations (Sun, SGI, IBM, HP, etc) and they just don't usually run
> Windows et. al.. They run Unix. Therefore he needs a language that
> runs on Unix.
>
> Question: Any decent versions of Pascal for Unix?

The IBM RS/6000 I first used at University had a Pascal compiler
running under AIX 3.1, called xlp (C was xlc and Fortran xlf).
It supported ISO-standard Pascal, so coming from a Turbo Pascal 3.0
background it took a little getting used to (but not much).
The teaching language was Ada, so I've never looked back to Pascal
anyway...

If your into free software you should have a look at gpc, the GNU
Pascal compiler. Last time I looked it too supported ISO Pascal but
also had modes for Turbo Pascal and some other variants. It uses the
gcc backend, so it should run on most Unix boxes.

Obviously you don't get all the flashy goo that Windows products have,
but I've never missed that.

Andrew.

Thant Tessman

unread,
Aug 5, 1997, 3:00:00 AM8/5/97
to

Martin Rodgers wrote:

> Have you ever read Elements of Programming Style, by
> Kernighan and Plaugher? They seem to be suggesting that
> good programming can be done in _any_ language. Even
> Fortran, which they use a lot in that book.

This is not directed at Martin Rogers or Kernighan and
Paugher specifically, but I've heard this claim in several
forms and I think it was time it was deflated.

Not every language lends itself to good programming. What
every language lends itself to is expressions of cleverness
which many less discerning programmers confuse with good
programming.

Of course there are many axes of measurement against which
to compare programming languages--availability, support, etc.
However, programming is about representing abstractions,
and the more abstractions a programming language can express,
and the more directly it can express those abstractions, the
better the language.

C, C++, and Fortran are all terrible languages because they
are far clumsier than other languages at expressing a
variety of abstractions.

--
thant at acm dot org

Christopher B. Browne

unread,
Aug 5, 1997, 3:00:00 AM8/5/97
to

On Tue, 05 Aug 97 10:26:34 GMT, Lawrence Kirby <fr...@genesis.demon.co.uk>
posted:
>No. Say language A can plot graphics and language B cannot then there are
>programs that can be written in language A that cannot be written in
>language B, even if language B defines a Turing-equivalent abstract machine.
>There's more to computer languages than simply computation.

This is only meaningful if language B does not have any interface to
allow it to communicate with something that can "plot graphics." That's
pretty unusual these days. Most languages don't have "intrinsic"
graphics commands; any self-respecting language can link to something
outside that makes use of system libraries...

>Also it isn't always trivial to prove that a language is "Turing-equivalent".
>For that to be true it has to be able to simulate a tape of *infinite*
>length. Certainly real implementations of computer languages are not
>Turing-equivalent.

This is pretty much true of *all* computer languages, as few have
"tapes of infinite length" attached to them.

It is more accurate to call computer systems state machines that have
pretty stupendously-large potential numbers of states.

However, the approximation to a Turing machine isn't bad; if one
can interface the language to a network (e.g. - The Internet), it's
easy enough to treat the Internet as a tape of infinite length...

And the difference between the number of states permitted with
(say) a computer with 64MB of memory and one with infinite memory
is not particularly comprehensible; the human mind has a hard time
grasping how many combinations 2^(2^29) really represents...

--
Christopher B. Browne, cbbr...@hex.net, chris_...@sdt.com
PGP Fingerprint: 10 5A 20 3C 39 5A D3 12 D9 54 26 22 FF 1F E9 16
URL: <http://www.hex.net/~cbbrowne/>
Q: What does the CE in Windows CE stand for? A: Caveat Emptor...


Patrick E. White

unread,
Aug 5, 1997, 3:00:00 AM8/5/97
to

Christopher B. Browne wrote:
>
> On Tue, 05 Aug 97 10:26:34 GMT, Lawrence Kirby <fr...@genesis.demon.co.uk>
> posted:
> >No. Say language A can plot graphics and language B cannot then there are
> >programs that can be written in language A that cannot be written in
> >language B, even if language B defines a Turing-equivalent abstract machine.
> >There's more to computer languages than simply computation.
>
> This is only meaningful if language B does not have any interface to
> allow it to communicate with something that can "plot graphics." That's
> pretty unusual these days. Most languages don't have "intrinsic"
> graphics commands; any self-respecting language can link to something
> outside that makes use of system libraries...

And, more importantly, the ease with which one language can be
translated to another depends on much more than just the Turing
completeness of the respective languages. Turning a C loop into a
Fortran (or Pascal, or Ada, or Modula-2) loop requires a trivial
synatctical analysis and replacement -- build the parse tree from one
language, then apply the grammar of the other.

Yet going from, for example, the C definition of "factorial" to a
recursive, lisp-like definition [without do-loops] requires a
sophisitcated semantic analysis. How would one automate turning

for(fact = 1,i=1;i<=k;i++)
fact *= i;

into

defun fact(n)
(if (eq n 0) 1
(fact (- n 1)))

?

or (if you have an answer for that) something like

for(m=1,i=1; i<k; i+=m)
m = (i+2) * (i+m)

?

-Patrick

LC's No-Spam Newsreading account

unread,
Aug 5, 1997, 3:00:00 AM8/5/97
to

On Sun, 3 Aug 1997, Doug Lo wrote:

> I recommend you to learn C, and then learn OO programming languages,
> such as C++ or JAVA...etc.

This might be true if Daniel would go on a programming career, but
if he wants to be a scientist, he'd better forget all the above, and
learn Fortran.

Jason Fisher

unread,
Aug 5, 1997, 3:00:00 AM8/5/97
to

I personally use FORTRAN 77. Beware, however. Has anyone here ever gone
into a software store and asked where to find a FORTRAN compiler. I've
never heard so mush laughing.

Jason

James Giles

unread,
Aug 5, 1997, 3:00:00 AM8/5/97
to


William Clodius <wclo...@lanl.gov> wrote in article
<33E743...@lanl.gov>...
> [...] It may also be possible, to quote the cliche, "to
> write FORTRAN in any language," however languages can and do differ in
> the degree to which they encourage "good programming style."

I've heard that phrase before, but these days it doesn't seem to carry the
weight it used to. For example, it may be possible to write C in any
language, but that prospect is too awful to consider in detail. Compared
to that, writing Fortran in any language sounds like a good idea.

Kaz Kylheku

unread,
Aug 5, 1997, 3:00:00 AM8/5/97
to
> I would like to start learning how to program computers and I have no
>idea what language to learn first. I would eventually like to be able to
>write programs that would help me solve problems in astronomy, physics,
>and math. I learned BASIC when I was a little kid, but that was a while
>back - and basic isn't practical for writing the types of programs that I
>want to write.
> Any suggestions on what programing language would be the best for me to
>start learning with?

It doesn't really matter, because you probably won't be landing a software
development contract any time soon. :)

Just make sure that whatever you learn has decent support for data abstraction
and structured programming, and that tools are readily available for
programming in that language.

William Clodius

unread,
Aug 5, 1997, 3:00:00 AM8/5/97
to
> <snip>

A few minor points:

I capitalized FORTRAN for a reason, I'll leave it for others to guess at
the reason.

Whatever FORTRAN's merits or defects as a language, a lot of the
reputation of FORTRAN code has to do with the fact that a large fraction
of its code base involves sophisticated applications, written by those
with minimal training in programming, and with runtime efficiency as a
dominant criteria. In any language this combination tends to result in
difficult to maintain code.

mark carroll

unread,
Aug 5, 1997, 3:00:00 AM8/5/97
to

In article <33E5D5...@ici.net>,
Alicia Carla Longstreet <ca...@ici.net> wrote:
(snip)
>available today. If you are into math, physics, astronomy, etc. you
>will, most likely, be working with Unix/Linux workstations (No Delphi,
>sorry). Most likely you should learn FORTRAN, but C will also get the
>job done (maybe not as fast), I would learn both (I did).

What about Modula-3? The syntax is Pascal-like and it has object
orientation like Delphi, with opaque typing and the like. I use it for
pretty much any complex software I write - the platform-independent
multithreading and GUI stuff is invaluable, the code is pretty
readable, and the strong typing helps most of my bugs to be caught at
compile time. There are good, free compilers out for Win95, WinNT,
OS/2, Linux, various Unices.... and even GUI code is very portable
between them.

Oh, and the binaries run quickly. (-: People have written operating
systems in M3.

If you want a nice IDE for M3, though (i.e. something beyond emacs
and m3gdb), you'd probably have to pay money for your software.

-- Mark

Lawrence Kirby

unread,
Aug 5, 1997, 3:00:00 AM8/5/97
to

In article <01bca11a$25d6ff80$9c7793cf@default>
james...@worldnet.att.net "James Giles" writes:

>Patrick E. White <wh...@mitre.org> wrote in article
><33E602...@mitre.org>...
>
>> Sorry, but I can't let this get away without a fight. This conclusion
>> can only be reached by a person who was a relatively limited exposure to
>> computer languages. I agree that C/C++/Pascal/Basic/Fortran/Ada are all
>> essentially equivalent -- heck, f2c (the fortran-c translator) would be
>> an impossible program to write if the languages weren't structually
>> compatible.
>
>This is a little misleading. All Turing-equivalent languages are
>mutually inter-translatable.

No. Say language A can plot graphics and language B cannot then there are


programs that can be written in language A that cannot be written in
language B, even if language B defines a Turing-equivalent abstract machine.
There's more to computer languages than simply computation.

Also it isn't always trivial to prove that a language is "Turing-equivalent".


For that to be true it has to be able to simulate a tape of *infinite*
length. Certainly real implementations of computer languages are not
Turing-equivalent.

--
-----------------------------------------
Lawrence Kirby | fr...@genesis.demon.co.uk
Wilts, England | 7073...@compuserve.com
-----------------------------------------


Mike Rubenstein

unread,
Aug 6, 1997, 3:00:00 AM8/6/97
to

"Patrick E. White" <wh...@mitre.org> wrote:

> Yet going from, for example, the C definition of "factorial" to a
> recursive, lisp-like definition [without do-loops] requires a
> sophisitcated semantic analysis. How would one automate turning
>
> for(fact = 1,i=1;i<=k;i++)
> fact *= i;
>
> into
>
> defun fact(n)
> (if (eq n 0) 1
> (fact (- n 1)))

My hope is that one does not automate this :-)

Michael M Rubenstein

Darin Johnson

unread,
Aug 6, 1997, 3:00:00 AM8/6/97
to

In article <33E4D5...@math.okstate.edu>, David Ullrich wrote:
> What's your complaint with Borland's latest (that would be
>Object Pascal / Delphi 3.0)?

It's incredibly non-portable :-)

--
Darin Johnson
da...@usa.net.delete_me

Arni Thoroddsen

unread,
Aug 6, 1997, 3:00:00 AM8/6/97
to

In article <5s655t$e...@river.gwi.net>, gws...@river.gwi.net (Gene W. Smith)
wrote:

> In article <Pine.A41.3.95.970802...@tiger3.ocs.lsu.edu>,


> Daniel Richardson <dri...@tiger3.ocs.lsu.edu> wrote:
>
> > I would like to start learning how to program computers and I have no
> >idea what language to learn first. I would eventually like to be able to
> >write programs that would help me solve problems in astronomy, physics,
> >and math.
>

> You would be musc better off learning to use a computer algebra system
> staring with M, such as Maple, Mathematica, Macsyma, or Matlab. If you
> don't like M there are even a few which start with other letters, such
> as Reduce or Axiom.
>
> Once you've learned one of these, you could learn a computer language,
> if you really needed to. Which I doubt.

I can certainly agree with the advice offered above. But it might also be
worth your while taking a look at Excel with Visual Basic. The spreadsheet
paradigm often offers a simple way to solve a complicated algorithmic
problem.

I would also point out that Prograph is a very nice language if you want to
mix up an application real fast. It also offers most of the concepts that
are associated with Object Oriented programming. Furthermore you have the
advantage of being able to observe the state of the data at all stages as
it flows through the processsing units in your program. This is a very
programmer friendly language and its data flow structure supports parallel
processing.

Of course you will need to have a Macintosh to use Prograph.

My advice is don't start out with C or C++ as they are likely to inhibit
your programming style and addict you to inferior programming habits. But
C++ is fine for projects where you need its speed enough to put up with its
difficulty of use.

---
Arni Thoroddsen arn...@itn.is

David Kastrup

unread,
Aug 6, 1997, 3:00:00 AM8/6/97
to

"Dann Corbit" <dco...@solutionsiq.com> writes:

> Patrick E. White <wh...@mitre.org> wrote in article
> <33E763...@mitre.org>...
> [snip]


> > Yet going from, for example, the C definition of "factorial" to a
> > recursive, lisp-like definition [without do-loops] requires a
> > sophisitcated semantic analysis. How would one automate turning
> >
> > for(fact = 1,i=1;i<=k;i++)
> > fact *= i;
> >
> > into
> >
> > defun fact(n)
> > (if (eq n 0) 1
> > (fact (- n 1)))
> >

> > ?
> I poke the answers into a table and be done with it. Iterative or
> recursive factorials make me whinge. [GADS! I love that word!]

Well, and so you should, since it was created and brought up by you
exclusively.

To answer the original question: I would not want to "automate" the
"conversion" you did above. The Lisp definition has a run time of
O(n) just to come up with 1 for n>=0, and an indefinite run time for
n<0. And I'm still ignoring the syntax errors it will incur.

--
David Kastrup Phone: +49-234-700-5570
Email: d...@neuroinformatik.ruhr-uni-bochum.de Fax: +49-234-709-4209
Institut für Neuroinformatik, Universitätsstr. 150, 44780 Bochum, Germany

Aaron Gross

unread,
Aug 6, 1997, 3:00:00 AM8/6/97
to

"Patrick E. White" <wh...@mitre.org> writes:

> Yet going from, for example, the C definition of "factorial" to a
> recursive, lisp-like definition [without do-loops] requires a
> sophisitcated semantic analysis. How would one automate turning
>
> for(fact = 1,i=1;i<=k;i++)
> fact *= i;
>
> into
>
> defun fact(n)
> (if (eq n 0) 1
> (fact (- n 1)))

And then, how would one automate turning

> defun fact(n)
> (if (eq n 0) 1
> (fact (- n 1)))

into

(defun fact (n)
(if (zerop n)
1
(fact (- n 1))))

?

Remember, (eq 0 0) may return either true or false in Common Lisp,
since the implementation is allowed to make copies of numbers at any
time.

And we won't even mention tail recursion.

Israel Gale

unread,
Aug 6, 1997, 3:00:00 AM8/6/97
to

Jeff Wilson <jdwi...@nortel.com> writes:

> Speed intensive calculations (mostly in real-time flight software or
> firmware) are done in assembly.

Do you know for a fact that NASA people still write new code in assembly?
In general, even the best assembly programmers cannot usually beat the
performance of today's best optimizing compilers.

One trick I've heard of is to use a disassembler on code generated by an
optimizing compiler, and then play with it to see if it is useful to tweak
it further.

-Israel Gale
ga...@hpc.pko.dec.com

Toon Moene

unread,
Aug 6, 1997, 3:00:00 AM8/6/97
to

William Clodius <wclo...@lanl.gov> wrote:

> It is one thing to say that something can be done and another thing to
> say that it can easilly be done or will always be done. It may be
> possible to do good programming in any language (although I have my
> doubt about Intercal), It may also be possible, to quote the cliche, "to


> write FORTRAN in any language," however languages can and do differ in
> the degree to which they encourage "good programming style."

I still tend to maintain that even in Fortran, you can write reasonably well
designed programs.

However, it is very easy to shoot yourself in the foot (or the colleague that
has to maintain you work after you've been blown of the earth by the global
nuclear warfare resulting from your work not conforming to Standard Fortran).

--
Toon Moene (mailto:to...@moene.indiv.nluug.nl)
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Phone: +31 346 214290; Fax: +31 346 214286
g77 Support: mailto:for...@gnu.ai.mit.edu; NWP: http://www.knmi.nl/hirlam

Hans de Vreught

unread,
Aug 6, 1997, 3:00:00 AM8/6/97
to

"James Giles" <james...@worldnet.att.net> writes:

>Patrick E. White <wh...@mitre.org> wrote in article

><33E602...@mitre.org>...

>> Sorry, but I can't let this get away without a fight. This conclusion
>> can only be reached by a person who was a relatively limited exposure to
>> computer languages. I agree that C/C++/Pascal/Basic/Fortran/Ada are all
>> essentially equivalent -- heck, f2c (the fortran-c translator) would be
>> an impossible program to write if the languages weren't structually
>> compatible.

>This is a little misleading. All Turing-equivalent languages are

>mutually inter-translatable. How easy that is depends on the
>available translation tools and the skill of the translators. At
>present, *ALL* languages must be translated to machine code
>in order to run. Since C is the closest (in form) to machine
>code of all machine-independent languages, a translator
>to C is easier (with the pre-existing tools and techniques)
>than to other languages. Hence, it is common for new
>experimental languages, and new attempts for widely
>portable implementations of old languages to begin life
>as preprocessors to C.

This a little misleading as well. C++ and Fortran are not compilable if
you follow their definitions (there exist several contructions in those
languages with ambiguous semantics). C has many constructions that are left
undefined. The other languages also have some flaws in their definitions.

In principle you can translate dialects (i.e. that a compiler makes of a
language), but that often doesn't make sense. In theory it is possible.

But to do this efficiently, the languages must be pretty close and preferably
the target language should be more simple than the other language.
--
Hans de Vreught | John von Neumann:
J.P.M.d...@cs.tudelft.nl | Young man, in mathematics
Delft University of Technology | you don't understand things,
The Netherlands | you just get used to them.

Dann Corbit

unread,
Aug 6, 1997, 3:00:00 AM8/6/97
to

Kaz Kylheku <k...@helios.crest.nt.com> wrote in article
<5sabpa$3or$1...@helios.crest.nt.com>...
> In article <01bca1e2$453c6cc0$757793cf@default>,
> James Giles <james...@worldnet.att.net> wrote:
>
> >You are confusing "Turing equivalent" with "Turing Machine". The first
> >refers to what set of algorithms are *expressible* in a language and the
> >second refers to a device capable of actually executing algorithms. It
is
> >very easy to express algorithms which would take more memory than you
have
> >to execute. That doesn't prevent you from expressing them. *Many* real
> >computer languages are Turing equivalent (or, I think the proper term is
> >actually "Turing Complete", but it's been a long time).
>
> However, C is not abstract enough to be able to deal with an arbitrary
amount of
> memory. An implementation must choose a finite size for pointers.
>
> The Turing machine doesn't have this problem, because you can move your
tape
> head as far along the classic infinite tape as you want. The C abstract
machine
> is firmly grounded in digital hardware concepts, however.
Seems to me you could have arbitrary precision integers. The C standard
only mandates the minimum size. In this scenario, why not just allocate
enough bits for a pointer to point as far as you need? Practically
speaking, of course, it would be hard to point beyond 1.844674407371e+19
pages of memory on most modern systems, and you would also need an OS that
knows how to deal with more than 64 bits of address. It seems 'doable' to
me, unless the Turing Machine is allowed the infinite address, and not just
something that approaches it.
--
Anonymous ftp sites for C-FAQ:
ftp://ftp.eskimo.com ftp://rtfm.mit.edu ftp://ftp.uu.net
Hypertext C-FAQ: http://www.eskimo.com/~scs/C-faq/top.html
C-FAQ Book: ISBN 0-201-84519-9.
Looking for something? Software? Algorithms? Publications?
http://altavista.digital.com/cgi-bin/query?pg=aq or http://www.infoseek.com

David Kastrup

unread,
Aug 6, 1997, 3:00:00 AM8/6/97
to

Israel Gale <ga...@wind.hpc.pko.dec.com> writes:

I'm a pretty good assembly programmer, and I've beat the optimizing
compilers available whenever I had to code something for speed,
considerably. Yes, I'm not beyond counting CPU cycles when necessary,
and when you're going for speed, this is an essential requirement for
"the best assembly programmers".

When I reach for assembly language at some particular spot, you can
bet I have reason for it, and that the resulting performance
acknowledges that (I've programmed video drivers for a major player in
the European market).

What *is* true, however, is that a person working with a good
optimizing compiler solely will beat the pants off a person using
assembler solely, because you can handle more efficient algorithms
more comfortably using higher level languages, typically. Unless the
assembly programmer does a complete, overall performance-related
high-level design first, and codes it afterwards. He'll need one heck
of a lot of time longer to get it coded, however.

Chris Forrester

unread,
Aug 6, 1997, 3:00:00 AM8/6/97
to

William Docter wrote:
>
> PLEASE LET THIS HOLY/FLAME WAR DIE !!!
>
> summary of posts issued thus far
> ================================
> someone too lazy to read the FAQ wrote:
> > What is the best programming language to do math in ???
>
> paraphrased crossposted responses
>
> response group #1 wrote:
> > C does "some esoteric task" better than Fortran. C rules. Fortran sucks.
>
> response group #2 wrote:
> > Fortran does "some esoteric task" better than C. Fortran rules. C sucks.
>
> response group #3 wrote
> > Pascal is easier to learn than C or Fortran. Pascal rules.
> > Both C and Fortran suck.
>
> response group #4 wrote
> > C and Fortran have extensive existing math libraries, Pascal doesn't.
> > C and Fortran rule. Pascal sucks.
>
> some PC dude wrote:
> > Basic, Excel, and Delphi rule. C and Fortran suck.
>
> some UNIX dude wrote:
> > Basic, Excel, and Delphi don't run on my machine and must therefore suck.
>
> some others wrote
> > Matlab/Maple are easy to do numeric/symbolic math in.
> > More complicate languages like C and Fortran suck
>
> CFD dude wrote:
> > Matlab is too slow to do computational fluid dynamics and therefore sucks.
>
> Choosing a language is like choosing shoes. Ya got different types,
> brands and colors. Running shoes work for running, but not as formal
> wear. Wingtips are good for buisness wear but not basketball, etc... A
> language works insofar as it does the task the programmer wishes with as
> little effort and time expended as possible. If the task is to add 1+1
> a single time, your brain or your fingers are supperior to any computer
> language.
>
> PLEASE LET THIS HOLY/FLAME WAR DIE !!!
>
> 'nuf said

Die? hahahahah!!! it wont die! it just has too many newsgroups which it
was posted in, and that's the thing that will keep it alive, because
when the C guys say Pascal is dead, the guys in the pascal group get
pissed, and so on and so on.

"The thread which wuld not die" lives on. :)

Ps. thanks god he didnt post in a basic or other such language... we'd
have at least twice the reply's!

Chris Forrester

unread,
Aug 6, 1997, 3:00:00 AM8/6/97
to

this has nothing to do with the last message, but i dont know how to
reply w/out the original message. anyways:

Anyone notice that the spelling of this thread has been almost perfect?
i wonder if spelling mistakes are less when people have a lot too say?
anyways, interesting, isnt it???

Craig Franck

unread,
Aug 7, 1997, 3:00:00 AM8/7/97
to

k...@helios.crest.nt.com (Kaz Kylheku) wrote:

>However, C is not abstract enough to be able to deal with an arbitrary amount of
>memory. An implementation must choose a finite size for pointers.

That is true, and it must also choose a size for fpos_t and FILENAME_MAX.
However, how you specify a path to a file is system dependent, as is any
limits involved. If the path is the form <system_dependent_part>file1.dat
you could have an infinite number of finite sized file1.dat files. It is
up to the implementation to allocate resources for the new files, all
placed in different directories on different storage devices.

>The Turing machine doesn't have this problem, because you can move your tape
>head as far along the classic infinite tape as you want. The C abstract machine
>is firmly grounded in digital hardware concepts, however.

Eventually, you would expect to exhaust all resources in the above scheme,
but there is no theoretical limit to the number of files you could have.
The limit is not in the C language, as with the size of pointers, but in
the machine it runs on. FILENAME_MAX and fpos_t are no longer a problem
because the path to any file is the only limiting factor, which depends on
the system.

--
Craig
clfr...@worldnet.att.net
Manchester, NH
Most rock journalism is people who can't write interviewing
people who can't talk for people who can't read. -- Frank Zappa


Dan Tex1

unread,
Aug 7, 1997, 3:00:00 AM8/7/97
to

Time to put in my view on this very commented on question.

The language you learn depends quite a bit on what you expect your future
in programming to be. I myself have learned Basic, QuickBasic, Fortran
and some C++.

For simple and small programs, some form of Basic will be very easy to
learn and simple to program in. For larger programs especially of a more
analytical number crunching nature Fortran provides decent simplicity
along with excellent speed. For accessing computer hardware and doing a
lot of graphics and user interfaces C++ has become very popular.

Now, I believe that what is more important than your choice of language
is your programming logic and style. In the long run I think writing
clean easily followable neat code is the most important thing you will
ever do ( hopefully do anyway ).

Now... my take on the languages I mentioned above:
Most people seem to think Basic is the easiest and quickest to learn.
Next there is Fortran. I expect it will take you just a little bit longer
to learn than Basic. Next there is C and C++. C++ will definately
require a much longer learning curve than the others, though C++ will give
you more overall capabilities.

Personally, I think Fortran is actually easier than Basic for most
applications. It is also faster and can handle more data more
efficiently for large applications. Basic on the other hand has built in
graphics primitives ( line drawing, etc ), and screen manipulation
capabilities.

Then... there is C++. It can do just about everything. Though
graphics are not actually a part of the standard, graphics libraries, etc
are abundant for C++ compilers. Now, I've noticed that a lot of avid
C++ programmers will tell you that C++ is MUCH better and is just as easy
as say Fortran. I totally disagree with that. I have found C++ much
more difficult to learn and it also requires a much better knowledge of
the hardware that you are programming for. It is also (in my opinion of
course) much easier to make mistakes with and harder to debug.

So.. what's my bottom line? If you are just going to dabble in
programming use some form of Basic. If you want the ability to write
interfaces or access system hardware or just about anything, use C++ or
something similar. If you want to do analytical number crunching programs
of more than a 'small' size, use Fortran. Just remember to use 'good'
programming techniques. If you don't do that the language you use is
irrelevant anyway! There are a zillion books out there that can teach
you good 'style'. I highly recommend that you purchase one... or two...
or three of them.

Finally, these are merely my opinions and I've only discussed a few
languages that I am familiar with.

Happy Hunting, Dan :-)

Aaron Gross

unread,
Aug 7, 1997, 3:00:00 AM8/7/97
to

rose...@sunserver1.rz.uni-duesseldorf.de () writes:

> Did I mention that with today's computing power and the state of the
> art of specialised computin languages there is no need to be concerned
> about matters of efficiency ? They get the job done, don not worry !

What planet do you live on?

LC's No-Spam Newsreading account

unread,
Aug 7, 1997, 3:00:00 AM8/7/97
to

On 6 Aug 1997, Darin Johnson wrote:

> (The real reason though I suppose, is that scientists often learn
> Fortran while they're trying to get a problem solved. Thus you tend
> to learn just as much as you need to get your job done, and no more.)

which is a good thing !


John Lewellen

unread,
Aug 7, 1997, 3:00:00 AM8/7/97
to

.... until you find that you need some code you wrote 2 - 3 years back
on a related project, and have to try to figure out what you did,
finally deciding to give it up and write your new code from scratch.
Then do the same thing a couple more years down the road.

Been there, done that, don't want to do it again.

Doing it right the first time is a far better solution in the mid- and
far-term, which in turn requires some investment in knowledge
acquisition.

The old saw of "fast, cheap and right ... choose any two of the three"
applies at least as well to programming as to anything else.

- John L.

--
+--------------------------------------------------------------------+
| John Lewellen Advanced Photon Source, Argonne National Lab.|
| Lewe...@aps.anl.gov Opinions expressed above are solely mine |
+--------------------------------------------------------------------+

William Docter

unread,
Aug 7, 1997, 3:00:00 AM8/7/97
to

Kaz Kylheku

unread,
Aug 7, 1997, 3:00:00 AM8/7/97
to

In article <01bca296$d26d3de0$607793cf@default>,

James Giles <james...@worldnet.att.net> wrote:
>
>
>Kaz Kylheku <k...@helios.crest.nt.com> wrote in article

>> However, C is not abstract enough to be able to deal with an


>arbitrary amount of
>> memory. An implementation must choose a finite size for
>pointers.
>

>There's a difference between "an implementation" and the
>language itself. I can write C programs to express any
>algorithm I want. Whether "an implementation" of C can
>actually handle it is a 'quality of implementation issue'.
>That's the case for *real* algorithms too, not just abstract
>Turing Machine simulations. The bottom line is that "an
>implementation" is the machine, not the language (it may be a
>virtual machine actually consisting of software, but it the
>'C-machine').

However, the C-machine is parametrized. Before you can conceive of using it,
you must make choices for the parameters. An integer does have a particular
size, etc.

The fact that pointers have finite sizes means that C cannot be a Turing
machine, no matter how you instantiate it. In other words, you can never have
an implementation of such sufficient quality that it will be a TM. Now this may
be true of all languages; however, in some languages it is only true because of
the constraints of real hardware. In C, it is true because of the constraints
within the language definition itself. In other words, even if you had a real
Turing Machine built, you would not be able to create a C implementation that
would allow programs to take full advantage of it.

Garrett

unread,
Aug 7, 1997, 3:00:00 AM8/7/97
to

James Giles wrote:
>
> Hans de Vreught <hd...@kgs.twi.tudelft.nl> wrote in article
> <hdev.87...@galaxy.twi.tudelft.nl>...
> >
> > As a language to learn, Fortran is a troll. C is easier.

Fortran serves the purpose of an elaborate hand calculator. For
scientists making <20K year it's fine.

> >
>
> I'd have said the other way around. I've seen people learning
> both languages and C students seem to take 4 or 5 times as long
> to get to the point of writing even acceptable code. Further,
> C is inherently slower unless provided with a much more
> sophisticated compiler (which Fortran could the beat again by
> adding the same degree of sophistication). C was designed (if
> that's a word you can use for it) as a quick and dirty hack,
> and neither efficiency nor clarity were considered.
>
> For the purposes of learning programming, neither is ideal.
>

I would like to hear what which language is ideal for learning programming...
Foxpro? Excel? Cobol? LOGO?

> --
> J. Giles
> Ricercar Software

--

Garrett (note spam filter in email address)

C++
Lisp
Whatever it takes to get the job done right
-
----------------------------------------------------------------------------
"If I stole somebody elses wave to fly up if I rose up with the avenue behind
me some kind of verb some kind of moving thing something unseen some hand
is motioning to rise to rise to rise" -Soul Coughing

Hui Wai Yan

unread,
Aug 7, 1997, 3:00:00 AM8/7/97
to


Doug Lo <jw...@ms11.hinet.net> wrote in article
<33E568...@ms11.hinet.net>...
> Rick Decker wrote:
> > Pascal is indeed an excellent language. In spite of its admitted lack
> > of popularity, I'd still recommend it. In light of what we've learned
> > in the past twenty years, though, it is getting a little long in the
> > tooth.
>
> Pascal is *Out-of-date* language. I strongly recommend C instead of
> PASCAL.
> C supports more mathematics functions rather than PASCAL.
> If you've learned it,you can forward to learn object-oriented
> programming
> languages,such as C++,smalltalk,JAVA...etc.
>
> Regards,
> Doug.

Sorry for interrupt! I do not agree your opinion. Pascal is still not out
of date. Do you see Delphi? It is Pascal base language.
Why you said Pascal support less mathematical functions than C? I don't
think so!
In my points of view, I suggest learning Pascal before learning C will be
better because Pascal provide better concept in structural programming than
C.
If you said object-oriented, there is also object Pascal (Delphi is a type
of object Pascal).
The only point I agree is C can do more powerful program than Pascal. In
conclude that I suggest Pascal for beginner rather than C.


Regards,
Sam

none

unread,
Aug 7, 1997, 3:00:00 AM8/7/97
to

On 6 Aug 1997 18:50:51 GMT, car...@hammond.cis.ohio-state.edu (mark
carroll) wrote:

>In article <33e89a52....@news.pnl.gov>,
>none <md_sw...@ccmail.pnl.gov> wrote:
>>On Mon, 04 Aug 1997 09:23:12 -0400, Alicia Carla Longstreet
>><ca...@ici.net> wrote:
>(snip)
>>>Pascal was designed as a teaching language. Of the versions of Pascal I
>>>have seen, the most useful is Deplhi. Unfortunately it is limited as
>>>the the platforms it runs on (Windows 3.x with win32s, Windows 95,
>>>Windows NT,a nd OS/2) rather useless for someone who is very likely to
>>>be working on a Unix or Linux workstation.
>>
>>Not necessarily, ma'am, but I'll address that in a moment. (see **)
>
>Once again I'm going to mention Modula-3 - I don't know why it's
>missing from the discussion here. It's in the Pascal family of
>languages, it has a very nice OO model with opaque typing, etc., is
>available for OS/2, Win95, WinNT, many Unices and Linux, and is so
>portable that you can write a complex program that uses network
>objects, multithreading, a GUI interface, etc. and have the same
>program compile using free compilers on all the above platforms
>without having to tinker with the source code.

Great!

When I was loading my Linux system I saw the option for loading
Modula-3 but hadn't considered it because I was unfamiliar with it.

I'll have to take a second look.

Thanks for the recommendation.


MD Sweeney
Research Scientist
Applied Geology and Geochemistry

Toon Moene

unread,
Aug 7, 1997, 3:00:00 AM8/7/97
to

Israel Gale <ga...@wind.hpc.pko.dec.com> wrote:

> One trick I've heard of is to use a disassembler on code generated by an
> optimizing compiler, and then play with it to see if it is useful to tweak
> it further.

This is indeed a method I use to understand how to get g77 produce better
code.

Of course, in such a case, the hard part is not generating better code by
hand, but to get the gcc backend generating better code.

Alan Bowler

unread,
Aug 7, 1997, 3:00:00 AM8/7/97
to

In article <33E59FA3...@rocketmail.com> mes...@rocketmail.com writes:
>
>Think that it is stupid to answer such questions like fighting a holy
>war: The problem is not the one who asks but those who answer!But, to
>say one (maybe) useful thing: I think a big problem with PASCAL is that
>there is no standard for it:

Not quite. There is a standard for Pascal. The problem is that
the standard is very very limiting. Staying within the bounds of
the Pascal standard does not let you do common things that are needed
by most practical programming. In particular, there is no separate
compilation. The implemetor is allowed to give you a fixed number
of predefined functions beyond those specified in the standard,
but he can't give you the ability to build your own library.
The only sanctioned method is for you to build a personal
library of text sources and merge these into one monolithic source
file. You can't dynamically allocate an array to match the
size of the runtime problem. If your arrays are not big enough
you need to change the source and recompile.
In the ANSI standard (as opposed to the ISO standard), you can't even
write a general dot product routine. You can write a dotproduct
routine for vectors of length ten, but you need another for vectors of
length eleven. The ISO standard at least addresses that problem.

Implementors realize these problems, and supply incompatible
extensions to allow you to write real world programs.

James Giles

unread,
Aug 7, 1997, 3:00:00 AM8/7/97
to


Oleg Krivosheev <kr...@fnal.gov> wrote in article
<vi8iuxi...@drabble.fnal.gov>...

> well, i cannot talk about clarity, but it was
> designed to efficient on PDP 11/70. I believe
> i read somewhere that ++ and -- where introduced
> into the language 'cause such expression can be
> compiled into one PDP instruction. Remember, it was
> designed to compile OS codes on computer with
> just 256k RAM.

None of what you've said applies to efficiency in a
general sense. The features you mention make C
easier to implement naively on a particular (narrowly
defined) type of hardware. A *good* implementation,
especially on significantly different hardware, is
harder in C than for nearly all other procedural
languages.

Gene W. Smith

unread,
Aug 7, 1997, 3:00:00 AM8/7/97
to

In article <olivier.marti-0...@garovirus.saclay.cea.fr>,
Olivier Marti <olivie...@cea.fr> wrote:

>The general direction given by Gene are correct : learn PROGRAMMING, in
>any language. But maybe not *any* language.

Actually, that was someone else.

>To learn programming correctly, it is far easier to begin with a *high
>level language*, with strong typing, fully structured, no side effects, no
>ambiguity.

He actually wanted to use it to solve scientific problems, which is
why I think Maple, for instance, would be a fine choice, even though
one could hardly call it strong typing and the rest of it.

Of course it's a very high level language, at any rate.

Kaz Kylheku

unread,
Aug 7, 1997, 3:00:00 AM8/7/97
to

In article <5s7smn$t...@selene.rz.uni-duesseldorf.de>,

<rose...@sunserver1.rz.uni-duesseldorf.de> wrote:
>Did I mention that with today's computing power and the state of the
>art of specialised computin languages there is no need to be concerned
>about matters of efficiency ? They get the job done, don not worry !

So what you are saying is that the engineers who are pushing the boundaries of
computing speed are doing it only so that lazy programmers could squander the
improvements by writing slower software?

That is far from the case. The reason for improvement is so that fast programs
execute even faster, and can take on larger sets of data.

Why would I spend money to upgrade to a computer that is twice as fast, and
then rewrite the particle simulation in such a sloppy way that the new machine
can simulate the same configuration of particles at only the same speed as the
old one?

Mukesh Prasad

unread,
Aug 7, 1997, 3:00:00 AM8/7/97
to

Kaz Kylheku wrote:
>
> In article <5sb5jp$7...@mtinsc02.worldnet.att.net>,
> Craig Franck <clfr...@worldnet.att.net> wrote:

> >k...@helios.crest.nt.com (Kaz Kylheku) wrote:
> >
> >>However, C is not abstract enough to be able to deal with an arbitrary amount of
> >>memory. An implementation must choose a finite size for pointers.
> >
> >That is true, and it must also choose a size for fpos_t and FILENAME_MAX.
> >However, how you specify a path to a file is system dependent, as is any
> >limits involved. If the path is the form <system_dependent_part>file1.dat
> >you could have an infinite number of finite sized file1.dat files. It is
> >up to the implementation to allocate resources for the new files, all
> >placed in different directories on different storage devices.
>
> Ooh, that is a clever subterfuge, Craig. I completely overlooked files.
>
> However, could you really have an infinite number of finite sized file1.dat
> files? That would imply that you can have an infinite number of file names
> whose suffix is "file1.dat". This is clearly not true, because for the purpose
> of the fopen() call, the whole filename must be held in a data object. Thus
> filenames must have a finite length, and hence the number of possible filenames
> that a C program can potentially access is finite. You therefore have an
> arbitrary, but finite, number of files of finite size.
>
> About the only workaround I can see is if you had an operator who would be
> willing to mount and unmount storage media when instructed by the program. In
> that case, the same name could refer to a different file at different times.
> The operator would have an endless supply of removable media, of course.

The system dependent part does not have to be explicitly
specified. E.g.

move left == cd( "left" );
move right == cd( ".." );
read/write data == read/write file1.dat

This is infinite in only one direction.
You could extend this to be infinitely long both ways
by placing some information in the directories
about the name of the left/right directories. So you
would have to choose between the above mechanism and

right == cd( "right" );
left == cd( ".." );

Of course, since all this is theoretical anyway,
why not just pretend you have a real tape drive which
you manipulate from your C program? (Operator
standing near tape drive takes care of making
sure tape is infinite.)

Craig Franck

unread,
Aug 8, 1997, 3:00:00 AM8/8/97
to

Garrett <gar...@nnoo.ssppaamm.en.com> wrote:

>I would like to hear what which language is ideal for learning programming...
>Foxpro? Excel? Cobol? LOGO?

With the Turtle graphics package, LOGO would be a good choice. I would
recommend Pascal or Basic over the first three.

Darin Johnson

unread,
Aug 8, 1997, 3:00:00 AM8/8/97
to

In article <5scsgb$erd$1...@helios.crest.nt.com>, Kaz Kylheku wrote:
>The fact that pointers have finite sizes means that C cannot be a Turing
>machine, no matter how you instantiate it.
...

>In other words, even if you had a real
>Turing Machine built, you would not be able to create a C implementation that
>would allow programs to take full advantage of it.

Untrue. You aren't forced to use direct addresses to implement this.
You can create a dynamically sized pointer if you wish. After all,
many systems have more hard disk space available to a program than the
size of a pointer would normally allow. So just create a structure
that addresses the TM memory; part of the structure leads to a
"handle" (specification of a file someone on the machine or the net),
and another part is an offset into that handle.

Granted, it's not easy, but you could hide it inside a library, at which
point it becomes easier for later users. People have done recursive
descent parsers in Fortran 77, despite the protests of people that Fortran
can't do recursion...

If a language can simulate a TM, then the language is equivalent to a TM.
The only limits are in hardware; and at this point, this means the total
number of memory locations a single machine can access (ie, all the
memory and all the harddrives on the planet).

Of course, the whole point of a TM is to prove theories, it's not supposed
to be practical, and emulating a TM is impractical (except for the classroom
perhaps). Also, just because two languages are TM equivalent does NOT mean
they can do the same thing in practical terms (they may be able to do the
same algorithms, but one might be unable to follow the appropriate calling
conventions for an OS).

--
Darin Johnson
da...@usa.net.delete_me

Christopher B. Browne

unread,
Aug 8, 1997, 3:00:00 AM8/8/97
to

On 6 Aug 1997 17:39:52 GMT, James Giles <james...@worldnet.att.net>
posted:
>This scholarly disregard for efficiency has been wrong from the
>first. It has only resulted in a lot of particularly poor code
>coming from people who *should* know better.

Frankly, I don't think that this has made any difference.

Bad code mostly comes out of bad programmers that are not
capable of writing good code.

There was an essay that claimed that "Real Programmers Write FORTRAN..."
It was mostly non-serious, but had one comment that is relevant and
quite interesting:

"Real Programmers can write FORTRAN code in *any* language..."

We can all disagree in different ways as to how that is either good
or bad; I think the point generalizes very nicely:

- "Bad Programmers will write BAD code in *any* language"
- LISP programmers will tend to have recursive code in *any* language...
- Prolog programmers will tend to do declarative code in *any* language...

Efficiency *is* important, because gratuitously stupid algorithms
can readily overcome *any* improvements that come from:
- Improved compilers
- Faster CPUs
- More RAM

What's more is that most people don't have the mathematical
background to be able to judge differences between algorithms.

When I write code, I at least *consider* what the order of complexity
is in terms of both memory and CPU usage. I don't use resources if I
really don't need them.

But I don't expect people to actually comprehend this. I've seen
too many programmers who don't have a clue of any of this.
--
Christopher B. Browne, cbbr...@hex.net, chris_...@sdt.com
PGP Fingerprint: 10 5A 20 3C 39 5A D3 12 D9 54 26 22 FF 1F E9 16
URL: <http://www.hex.net/~cbbrowne/>
Q: What does the CE in Windows CE stand for? A: Caveat Emptor...


Martin Rodgers

unread,
Aug 8, 1997, 3:00:00 AM8/8/97
to

William Docter wheezed these wise words:

> PLEASE LET THIS HOLY/FLAME WAR DIE !!!

Well said. Either the question has been answered by now, or answering
the original question is not the point of this thread. Either way, it
should be time to move on.

BTW, does comp.lang.pascal still exist?
--
<URL:http://www.wildcard.demon.co.uk/> You can never browse enough
"There are no limits." -- ad copy for Hellraiser
Please note: my email address is gubbish

Andreas Eder

unread,
Aug 8, 1997, 3:00:00 AM8/8/97
to

J. Giles writes:
>This scholarly disregard for efficiency has been wrong from the
>first. It has only resulted in a lot of particularly poor code
>coming from people who *should* know better.

No, it has not been. Just to the contrary. The obsession with efficieny
only leads to fast but in many cases incorrect code! Most programmers I know
(either personally or from their posts in News) are far more concerned with
speed than correctness. An attitude, that I just dont get! What's the use of
speedy but wrong answers?
What Dijkstra surely meant was that correctness is the prime goal, and
only afterwards speed is an issue.

Andreas


Tom Thomson

unread,
Aug 8, 1997, 3:00:00 AM8/8/97
to

In article <33E748...@signature.below>, Thant Tessman
<add...@signature.below> wrote:
>Martin Rodgers wrote:
>
>> Have you ever read Elements of Programming Style, by
>> Kernighan and Plaugher? They seem to be suggesting that
>> good programming can be done in _any_ language. Even
>> Fortran, which they use a lot in that book.
>
>This is not directed at Martin Rogers or Kernighan and
>Paugher specifically, but I've heard this claim in several
>forms and I think it was time it was deflated.
>
>Not every language lends itself to good programming. What
>every language lends itself to is expressions of cleverness
>which many less discerning programmers confuse with good
>programming.
>
>Of course there are many axes of measurement against which
>to compare programming languages--availability, support, etc.
>However, programming is about representing abstractions,
>and the more abstractions a programming language can express,
>and the more directly it can express those abstractions, the
>better the language.
>
>C, C++, and Fortran are all terrible languages because they
>are far clumsier than other languages at expressing a
>variety of abstractions.
>
One could argue that Haskell, Parlog, and Ada are all terrible languages
because they are far clumsier than other languages at expressing a variety of
abstractions, just as easily - for example one might consider the position of
functional languages like Haskell wrt that commobly used abstraction "a
mutable model of a real word mutable object".

Another approach might be to consider how easy it is to write really awful
programs in a language. The more capabilities a language has, the more scope
there is for "misusing" them (ie for using them in such a way that the
function of the code is totally obscured). (Is that what Thant Tessman meant
by "expressions of cleverness", I wonder?) So a language with fewer
capabilities is better, because it's harder to write bad programmes in it.

I personally believe that Kernighan and Plaugher had it right. It is possible
to write bad programs in any language, and it is possible to write good
programs in any language. The attempt to "deflate" this claim above advances
no argument or evidence, just raw assertion.

Some languages are easier than others to express some algorithms in (eg
Fortran is a very good language to express matrix inversion using pivot
selection to reduce rounding errors; Hope and Prolog are very bad language to
do that in; on the other hand, Prolog makes it easy to handle unification -
it's built in for you - while it's difficult in Fortran and very difficult and
tedious in Haskell). A good programmer chooses the right language for the job
at hand, or - if he's stuck with the wrong language - writes the same program
in the wrong language as he would have in the right language. At the end of
the day there are good and bad programmers: NOT good and bad programming
languages.

Tom

Afterthought: actually, I might be wrong; the existence of C++ is after all
pretty strong evidence that there ARE bad programming languages.


Martijn Dekker

unread,
Aug 8, 1997, 3:00:00 AM8/8/97
to

In article <01bca30b$755c9220$712b...@hkstar.com.hkstar.com> "Hui Wai Yan" <sam...@hkstar.com> writes:
++
++
++Doug Lo <jw...@ms11.hinet.net> wrote in article
++<33E568...@ms11.hinet.net>...
++> Rick Decker wrote:
++> > Pascal is indeed an excellent language. In spite of its admitted lack
++> > of popularity, I'd still recommend it. In light of what we've learned
++> > in the past twenty years, though, it is getting a little long in the
++> > tooth.
++>
++> Pascal is *Out-of-date* language. I strongly recommend C instead of
++> PASCAL.
++> C supports more mathematics functions rather than PASCAL.
++> If you've learned it,you can forward to learn object-oriented
++> programming
++> languages,such as C++,smalltalk,JAVA...etc.
++>
++> Regards,
++> Doug.
++
++Sorry for interrupt! I do not agree your opinion. Pascal is still not out
++of date. Do you see Delphi? It is Pascal base language.

exactly , thats the reason that the industry never really picked up
delphi. But there is C++ Builder, basically delphi with C++ instead
of pascal.
really, pascal is out of date.

--
Martijn Dekker -- mde...@wins.uva.nl
UvA - Math department Universiteit van Amsterdam
PFF - Computer Games for X11 and Java
http://turing.wins.uva.nl/~mdekker/pff/ (Xcogitate, Templar)

LC's No-Spam Newsreading account

unread,
Aug 8, 1997, 3:00:00 AM8/8/97
to

On 4 Aug 1997, Raptor wrote:

> powerful. Any program can be written in C. Not every program can
> be written in FORTRAN.

But not any C program is easy to read .... :-)

Don't know why, but while all Fortran programmers I know usually write each
subroutine PINCO in a source file called pinco.f, most C programmers I know
like to hide routine pinco() together with panco() and pallino() together into
a single source file with a name xxxx.c which has whatsoever no relation with
the routine names .... :-(

Martin Rodgers

unread,
Aug 8, 1997, 3:00:00 AM8/8/97
to

Tom Thomson wheezed these wise words:

> I personally believe that Kernighan and Plaugher had it right. It is possible
> to write bad programs in any language, and it is possible to write good
> programs in any language. The attempt to "deflate" this claim above advances
> no argument or evidence, just raw assertion.

I share this belief. Kernighan and Plaugher's book contains some
powerful arguments to support it, based on level heady common sense. I
can apply rules like "Write clearly - don't be too clever" and "Make
sure comments and code agree" in any language. And I have applied them
in every language that I've used (I won't list them all), from
assembly language, Basic and C to Lisp, Haskell, and Prolog.



> Afterthought: actually, I might be wrong; the existence of C++ is after all
> pretty strong evidence that there ARE bad programming languages.

I think that compiler writers may agree with you. It's far easier to
write code in a language than to write a compiler _for_ that language.
That may explain the popularity of C++, dispite the problems. However,
until those problems become serious enough to stop us from using C++,
I think that we may be stuck with it. After all, look at Cobol.

My "solution" is too only use the subset of C++ that I'm comfortable
with. I should really say "comfortable", as I'm not even very happy
about using C these days. Life just seems too short, somehow! If
there's an alternative tool that gets the job done just as well, but
takes less of my time, then I'll prefer it to C for that task.

The danger, I think, is too try to use the same tool for every task.
If we take that to it's logical conclusion, then we should be using
assmebly language. After all, there are programmers who justify C/C++
by saying that they need assembly language for things like MPEG
drivers. This is the "low level is best" argument, but does it apply
to every task? Does it apply to writing all apps? I don't think so,
esp when we can mix languages so easily, as we can today. Write part
of your app in C++, another part in VB/Lisp/Prolog/Java/etc, and for
the really tight realtime parts, use assembly language.

So, the answer is to use a variety of languages - each one suited to
different kinds of tasks, or different _levels_ within it. We know
that some parts of an app will change more frequently than others, and
they may also be the largest parts of the app. Writing those parts in
assembly language might not be a good idea, while it may be ideal for
that DSP/graphics function that consumes most of the run time.

Books like Kernighan and Plaugher's encourage us to think about these
things, instead of blindly optimising the code before we even write
it. As they said in chapter 7, "Make it right before you make it
faster." That should apply in _any_ language.

Kaz Kylheku

unread,
Aug 8, 1997, 3:00:00 AM8/8/97
to

In article <33EA22...@polaroid.com>,
Mukesh Prasad <pra...@removit-polaroid.com> wrote:

>The system dependent part does not have to be explicitly
>specified. E.g.
>
> move left == cd( "left" );
> move right == cd( ".." );
> read/write data == read/write file1.dat
>
>This is infinite in only one direction.

Functions for managing and navigating directories are not part of the C
language, however. This addition to the library component would certainly
help.

Nevertheless, what does that say about the TM equivalence of the core language
itself when you have to resort to library tricks?

It's possible for a language to be TM equivalent without resorting to libraries
that reference files. Simply don't allow the size of a pointer to be a fixed
constant. In fact, don't allow the language to compute the size of a pointer at
all.

I'm sure that languages like the POSIX shell and awk are Turing equivalent,
simply because nothing in them is tied to machine addressability. In principle,
the objects that are manipulated by these languages could be arbitrariliy
large and there could be an arbitrary number of them.

Kurt Watzka

unread,
Aug 8, 1997, 3:00:00 AM8/8/97
to

OTOH, there are C programmers who put e04avd() into e04avd.c, e05avf() into
e05avf.c, etc. I prefer some logical grouping of related functions into
modules, but this is a quesiton of style. Nothing in FORTRAN enforces that
one subroutine per file scheme (I have written FORTRAN programs with more
that one subroutine per file). Nothing in C prevents it, either. If you
don't have 'grep' on your system, write it yourself. Nowadawy, some
excellent tools are available for browsing source files.

Whether you put each function into its private compilation unit
depends a lot on your source code management process, too. Working
in a large team, with lazy source locking, the one function
in one compilation unit (or at least one _external_ function in
one compilation unit) may be a good idea, together with a database
that keeps track of what those funny names adapted to the capabilities
of a 20 year old file system are supposed to mean.

If porting to such a system is not completely unthinkable to you,
this may even be a good method to handle the C problem with the low
number of significant characters in external symbols. Just pick
meaningless "systematic" function names, and use a different management
process for the "real" names. A "nice to have" feature is a
preprocessor that changes the "file system" names to "real names"
when a module is checked out of source code control, and changes
them back before testing, so that the "real" names are visible
without to much of a hassle to the coder/maintenance engineer.

Kurt

--
| Kurt Watzka Phone : +49-89-2180-6254
| wat...@stat.uni-muenchen.de

Kaz Kylheku

unread,
Aug 8, 1997, 3:00:00 AM8/8/97
to

In article <hdev.87...@galaxy.twi.tudelft.nl>,
Hans de Vreught <J.P.M.d...@cs.tudelft.nl> wrote:

>Oleg Krivosheev <kr...@fnal.gov> writes:
>>well, i cannot talk about clarity, but it was
>>designed to efficient on PDP 11/70. I believe
>>i read somewhere that ++ and -- where introduced
>>into the language 'cause such expression can be
>>compiled into one PDP instruction. Remember, it was
>>designed to compile OS codes on computer with
>>just 256k RAM.
>
>An 11/70? That one came into existance in the late 70s or early 80s.
>
>Sounds more like an 11/34 or may be one of its predecessors.
>
>Well, from the K&R book (preface):
>"C was originally designed for and implemented on the Unix operating system on
>the PDP-11, by Dennis Ritchie."

That is true, but C was derived from NB which was derived from B. These
predated the PDP-11. It is, for example, a common myth that the pre- and
post-increment operators in C were inspired by similar features in the PDP-11
instructions set.

>And yes, at that time the C language and its compiler was one of the fastest
>around. Nowadays however, the low-level constructs get in the way of efficient
>translation.

Oh, so back _then_, those low level constructs didn't matter but _now_ they do?

This is unlikely, especially given that the history of modern machines is
intertwined with that of C. Modern processors are developed with implicit
support for C compiling.

Thant Tessman

unread,
Aug 8, 1997, 3:00:00 AM8/8/97
to

Tom Thomson wrote:

> [...] Some languages are easier than others to express

> some algorithms in (eg Fortran is a very good language to
> express matrix inversion using pivot selection to reduce
> rounding errors; Hope and Prolog are very bad language to

> do that in; [...]

Is this because there is something about Fortran that allows
it to express the algorithm particularly elegantly? Or is it
because someone already sweated over a library?


> [...] At the end of the day there are good and bad

> programmers: NOT good and bad programming languages.

Of course there are good and bad programmers. And of
course different languages are good at different things.
But claiming that programming languages cannot be compared
in absolute terms implies that a programming language can
only be made better at expressing one set of algorithms
by making it worse at expressing others--in other words,
that no absolute advances at all can or have been made in
the field. I hope it's clear that this position doesn't
make any sense.

(I am willing to admit that a good programmer using a bad
language is probably going to be more productive than a bad
programmer using a good language.)

> Afterthought: actually, I might be wrong; the existence
> of C++ is after all pretty strong evidence that there
> ARE bad programming languages.

You said it, not me.

-thant

--
thant at acm dot org

Ron Natalie

unread,
Aug 8, 1997, 3:00:00 AM8/8/97
to

> An 11/70? That one came into existance in the late 70s or early 80s.
> Sounds more like an 11/34 or may be one of its predecessors.

11/34's came after 11/70's.

Mukesh Prasad

unread,
Aug 8, 1997, 3:00:00 AM8/8/97
to

Yes, you are right -- the Turing tape better
corresponds to the physical memory rather
than disk or tape.

But Turing equivalence has to be with a machine
and not a language. (You could propose a
hypothetical C machine, of course.)

Fundamentally, von-Neumann architecture assumes
a finite _addressable_ memory. Which is not
Turing compatible, strictly speaking. The Turing
architecture assumes an infinite tape, theoretically
incapable of random addressing.

C simply happens to be close to to the vN architecture.

As to whether it says anything about the language,
I don't think so. TM represents an early attempt
to build a computer, later superceded by better
attempts. It is only kept around today conceptually,
because the architecture is simpler to build
models for, and hence useful in theoretical
computer science.

Would you rather program a TM or a vNM?
(You can best answer this question if
you have attempted to write a program
for a theoretical TM.)

It is loading more messages.
0 new messages