|
Authored by: rcsteiner on Wednesday, November 28 2012 @ 02:11 PM EST |
Depends on the language. Program setup and tear down is not a requirement for
most (if not all) interpreted languages.
When I first learned to program, the entire sequence to write a Hello World
program in BASIC was as follows:
NEW
10 PRINT "HELLO WORLD"
RUN
No need to invoke the interpreted (Integer BASIC was part of the Apple ][), and
no need to even create a file.
---
-Rich Steiner >>>---> Mableton, GA USA
The Theorem Theorem: If If, Then Then.[ Reply to This | Parent | # ]
|
|
Authored by: tknarr on Wednesday, November 28 2012 @ 02:59 PM EST |
Probably "Hello World" would still be taught first regardless of tradition.
It serves a basic purpose: it's the simplest program you can write that has all
the overhead needed for any program. To get it working you have to be able to
edit a source file, compile it, link it and start it executing. The code has all
the wrapper bits any program will need like the declaration of main(). You've
had to use the most basic syntax elements of the language itself. And it does
just enough to demonstrate that it ran and nothing more. If you can get it to
run and output "Hello World" successfully, you've gotten a handle on all that
infrastructure you're going to need for every other program. And if anything
went wrong, it had to be in that infrastructure because the program logic's too
simple to have any bugs so you won't be distracted by hunting bugs in your
code. [ Reply to This | Parent | # ]
|
|
|
|
|