|
SESSION 2 Part4 |
Let's take a
look at development language - continued |
|
|
|
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
Excuse me,
I have a question!
What the heck is
Interpreter or
Compiler?
|
|
|
 |
 |
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
|
|
|
|
|
 |
When the power is
supplied,
it is "ON" then "1".
|
 |
|
|
|
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
 |
 |
|
Well, it is about
the format
to run the program, so…
At the end of the day,
a computer can only
recognize"0" and "1".
Which means it can only
recognize
if the switch is ON or OFF. |
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
Really!?
They can do
such complicated
stuff, though.
Quite surprising,
really. |
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
 |
 |
 |
|
|
|
|
 |
|
|
|
|
|
|
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
You see how complicated
things are actually made
out of combination of
simple ones?
That's why
you need
to give an order with
"0" and "1",
so that a computer can
understand it. |
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
 |
 |
 |
|
|
|
|
 |
|
|
|
|
 |
 |
|
 |
|
 |
|
Example of conversion into computer's language |
|
Human's language |
Computer's language |
A |
1000001 |
B |
1000010 |
C |
1000011 |
|
|
(Example of converting ASCII code into binary number) |
|
|
|
 |
|
 |
|
|
|
|
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
This computer's language is called
machine language and
"A" becomes "1000001" in machine language.
But, it is humans who create the program,
so using only "0" and "1" would be quite
challenging, wouldn't'
it?
So, don't you think that it is better to create
with the
language
that we understand, then
"translate" into the language
that computer
can understand? |
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
That is why
Development language (programming language)
came to the scene.
Firstly, we use development language to create
a program
in the way humans can understand.
This is called source code.
But, a computer still can't understand it.
So, we need to "translate" into machine language
which a computer can understand to run the program.
This translation method is called execute form.
This depends on each development language,
so it becomes special characteristic as well.
The most common form is
interpreter type and compiler type. |
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
|
|
|
|
|
|
 |
 |
|
|
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
Simply put,
interpreter type is simultaneous
interpretation type and
compiler type is
kind of
like translated book type,
I suppose. |
|
|
 |
 |
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
|
|
|
|
|
 |
 |
|
|
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
 |
 |
|
It is interesting that
there are many
different ways. |
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
|
|
|
|
|
|
|
 |
|
 |
|
Characteristic of execute
form |
|
|
Interpreter type |
Compiler type |
What is needed to run |
Source code
and
Interpreter soft |
Execute form program
(binary form)
Usually called as Soft |
Number of translation |
Every time |
Because interpreter translates as it runs. |
|
Once |
Not needed after execute form program is
created. |
|
Speed |
Slow |
Because interpreter translates as it runs. |
|
Fast |
Because it only keeps running machine language
that has been already translated.
|
|
Machine-dependence |
Low |
When it is run by different kind of CPU or OS,
as long as there is "interpreter" for the model,
it can be run by any computer. |
|
High |
When it is run by different kind of CPU or OS,
execute form program needs to be recreated
because machine language is different. |
|
Confidentiality |
Low |
Distribution of source code is compulsory to
run. Therefore, when it is read, it is easy to
understand the content.
|
|
High |
Distribution of source code is unnecessary to
run. Because execute form program is "0" and
"1", it can not be read as it is.
|
|
Remark |
Language called Script often uses this form. |
Desktop soft such as game often uses this form.
So called Soft creating form. |
|
|
|
|
|
 |
|
 |
|
That's right.
Translated book is
something like
English and Japanese |
|
That is why
there are different soft
for Windows and Mac.
Compiler form, isn't it? |
|
|
|
|
|
|
 |
|
|
|
|
 |
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
Each method has
its strengths and weaknesses as is shown in
this figure.
Remember the characteristic of them.
Also, the soft which is compiled to create
is called binary, but
it can not be used
with other OS
because it is translated to the language
for CPU or OS.
By the way, this binary literally comes from
binary as dyadic system. |
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
And, as for script form, byte cord form, or binary formin the
figure,
this shows classification of similar development languages
with
characteristic point of view.
Script language form
is
interpreter form, quick to run, and easy to write.
Many of them are useful in string processing.
On the other hand, it is slow to process in general.
Binary form is
compiler form, and high in machine-dependence but fast.
Byte code form is
combination of merit from both compiler and interpreter form
It is low in machine-dependence, and the speed is relatively
fast.
It doesn't need to distribute source cord, and code content is
hard to be read, too.
But there is less boundary these days,
and things are getting faster with even script language
can
compile, for example.
Also, current computer is said to be as good as
super computer from just a while ago.
Script from is absolutely no problem because computer itself
is
getting faster.
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
|
|
|
|
|
 |
I see |
 |
|
|
|
|
 |
|
|
|
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
Well,
It sounds difficult….
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
 |
 |
 |
|
|
|
|
 |
|
|
|
|
|
|
|
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|
|
Maybe because there have been
lots of terminologies.
But, the object of this time
is to get to know "types" and
"characteristics"
to choose development language.
You don't have to remember in detail,
and just keep in mind, like
"Alright, it is good to know
these kind of things" |
|
|
|
|
|
 |
 |
|
 |
 |
|
|
 |
 |
 |
 |
 |
|
|
|
|
 |
|
|
|
|
 |
 |
|
|
|
|
|
|
|
|