By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,290 Members | 1,195 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,290 IT Pros & Developers. It's quick & easy.

Object Oreinted

P: n/a
It may be a bad question, but..
What is the difference between Object Oriented Language and Object
Orinted Srcipting? The code is simplier in scripting than the code in
other programming language? or..

Thanks,
Ching
Jul 17 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
On 4 Apr 2005 14:13:13 -0700, cs*****@yahoo.com (Academic Q) wrote:
It may be a bad question, but..
What is the difference between Object Oriented Language and Object
Orinted Srcipting? The code is simplier in scripting than the code in
other programming language? or..


There is no real difference.

"Scripting" is often used for when a programming language is embedded inside
another application; since in this situation the program may be only responding
to particular events, or running a sequence of tasks, typically the programs in
"scripts" are simpler than standalone programs. But it's all still a
"Language".

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #2

P: n/a
"Academic Q" <cs*****@yahoo.com> wrote in message
news:35**************************@posting.google.c om...
It may be a bad question, but..
What is the difference between Object Oriented Language and Object
Orinted Srcipting? The code is simplier in scripting than the code in
other programming language? or..

Thanks,
Ching


The term "scripting" commonly refers to programming in a language that is
interpreted directly from the source. PHP, Perl, and Javascript would fit
the description, whereas C# and Java do not, because code written in them
goes through an intermediate compilation stage.
Jul 17 '05 #3

P: n/a
Chung Leong wrote:
"Academic Q" <cs*****@yahoo.com> wrote in message
news:35**************************@posting.google.c om...
It may be a bad question, but..
What is the difference between Object Oriented Language and Object
Orinted Srcipting? The code is simplier in scripting than the code in
other programming language? or..

Thanks,
Ching


The term "scripting" commonly refers to programming in a language
that is interpreted directly from the source. PHP, Perl, and
Javascript would fit the description, whereas C# and Java do not,
because code written in them goes through an intermediate compilation
stage.


There is always a debate on terminology arising from such questions. My
position is that "scripting" languages are those that are not only
interpreted (that would be a wider group of, well, "interpreted" languages),
but are also run like a classic shell script, in a single pass through the
interpreter without any long-term in-memory effects. PHP (and AFAIK Perl) is
thus a perfect example, while Javascript (which is interpreted, but once
downloaded and interpreted sits in the memory (or, rather, its objects do),
from where it can be called anew until it is dumped (usually by reloading
the Web page).

Berislav
Jul 17 '05 #4

P: n/a
Berislav Lopac napisa³:
Chung Leong wrote:
"Academic Q" <cs*****@yahoo.com> wrote in message
news:35**************************@posting.google.c om...
It may be a bad question, but..
What is the difference between Object Oriented Language and Object
Orinted Srcipting? The code is simplier in scripting than the code in
other programming language? or..

Thanks,
Ching


The term "scripting" commonly refers to programming in a language
that is interpreted directly from the source. PHP, Perl, and
Javascript would fit the description, whereas C# and Java do not,
because code written in them goes through an intermediate compilation
stage.


There is always a debate on terminology arising from such questions. My
position is that "scripting" languages are those that are not only
interpreted (that would be a wider group of, well, "interpreted"
languages), but are also run like a classic shell script, in a single
pass through the interpreter without any long-term in-memory effects.
PHP (and AFAIK Perl) is thus a perfect example, while Javascript (which
is interpreted, but once downloaded and interpreted sits in the memory
(or, rather, its objects do), from where it can be called anew until it
is dumped (usually by reloading the Web page).

Berislav


Well, I'd say that PHP can have such long-term memory effects too!
Especially when something goes wrong (infinite loop for example). ;)

Python (which is AFAIK similar as for the concept to Perl) also sometimes
has long-term memory effects - I have a few applets running on my
desktop, written in Python, which reside in memory for days sometimes
(and I am not talking about errors here). In comparison to this,
JavaScript's "long-term" sounds like a joke. :)

Besides, JavaScript is called JavaScript for some reason, isn't it?
Namely it's a scripting language similar to Java.

And those JS's "long-term memory effects" usually last a few minutes at
the most. How long can someone browse a single webpage?

Thus, I'd say that JavaScript fits nicely and neatly into the "scripting
languages" category defined this way. This, however, wouldn't be that
clear for Python/Perl. Therefore I prefer to call them all "scripting
languages", with "interpreted" as a synonim and "languages that are run
straight from the sources, without any compilation phase in between" as
the definition.

Cheers
Mike
Jul 17 '05 #5

P: n/a
Micha³ Wo¼niak wrote:
Besides, JavaScript is called JavaScript for some reason, isn't it?
Namely it's a scripting language similar to Java.
Actually, no. It was originally to be named LiveScript; when Java became a
fad Netscape decided to call it Javascript to ride on the other language's
success. Their explanation was that JS is used to interact with Java
applets. Ironically, Java applets are all but forgotten now, while
Javascript is taking their place for placing interactive content on the
web.
And those JS's "long-term memory effects" usually last a few minutes
at the most. How long can someone browse a single webpage?
For days, if necessary. :)

Javascript enables Web pages to become full-scale client-side Web
applications, which communicate interactively with the server without
reloading the "page" and display the results immediately. An excellent
example is Google Mail, which refreshes its inbox contents via Javascript,
without reloading the page. Another great example is http://maps.google.com.
Thus, I'd say that JavaScript fits nicely and neatly into the
"scripting languages" category defined this way.


As I said, it's more than that. I have created several JS applications which
load into memory and then reside there, waiting for user input events or
probing server in regular intervals for new data to process/display.

Berislav
Jul 17 '05 #6

P: n/a

"Chung Leong" <ch***********@hotmail.com> wrote in message
news:Q_********************@comcast.com...
"Academic Q" <cs*****@yahoo.com> wrote in message
news:35**************************@posting.google.c om...
It may be a bad question, but..
What is the difference between Object Oriented Language and Object
Orinted Srcipting? The code is simplier in scripting than the code in
other programming language? or..

Thanks,
Ching


The term "scripting" commonly refers to programming in a language that is
interpreted directly from the source. PHP, Perl, and Javascript would fit
the description, whereas C# and Java do not, because code written in them
goes through an intermediate compilation stage.


Note that Java is not compiled into executable code. It is compiled into
intermediate code which is then converted into machine-specific instructions
by the current JVM.

--
Tony Marston

http://www.tonymarston.net

Jul 17 '05 #7

P: n/a
Tony Marston <to**@nospam.demon.co.uk> wrote:
The term "scripting" commonly refers to programming in a language that is
interpreted directly from the source. PHP, Perl,
Are you sure? What does the Zend engine do? And I found this:
http://www.perl.com/doc/manual/html/lib/B/Bytecode.html
and Javascript would fit the description,
MS ships a javascript compiler.
whereas C# and Java do not, because code written in them goes through
an intermediate compilation stage.


Note that Java is not compiled into executable code. It is compiled
into intermediate code which is then converted into machine-specific
instructions by the current JVM.


You are confusing Java the Language with a JVM implementation. gcj will
happily compile java directly into native code.

All these definitions of script vs. language are totally silly, there
are too many exceptions out there.

Jul 17 '05 #8

P: n/a
Daniel Tryba wrote:
Tony Marston <to**@nospam.demon.co.uk> wrote:
The term "scripting" commonly refers to programming in a language
that is interpreted directly from the source. PHP, Perl,
Are you sure? What does the Zend engine do? And I found this:
http://www.perl.com/doc/manual/html/lib/B/Bytecode.html
and Javascript would fit the description,
MS ships a javascript compiler.
whereas C# and Java do not, because code written in them goes
through
an intermediate compilation stage.


Note that Java is not compiled into executable code. It is compiled
into intermediate code which is then converted into machine-specific
instructions by the current JVM.


You are confusing Java the Language with a JVM implementation. gcj
will happily compile java directly into native code.

All these definitions of script vs. language are totally silly, there
are too many exceptions out there.


This is a good point. People often confuse a language (i.e. the syntax) with
its implementation (i.e. what can a program do). Even in my responses above
I have intentionally blurred that distinction, equating the browser-based
implementation of Javascript with the language itself -- JS can and have
succesfully been implemented in various environments.

Berislav
Jul 17 '05 #9

P: n/a
Berislav Lopac <be************@lopsica.com> wrote:
You are confusing Java the Language with a JVM implementation. gcj
will happily compile java directly into native code.


This is a good point. People often confuse a language (i.e. the syntax) with
its implementation (i.e. what can a program do). Even in my responses above
I have intentionally blurred that distinction, equating the browser-based
implementation of Javascript with the language itself -- JS can and have
succesfully been implemented in various environments.


And offcourse JavaScript (eg. "Netscape" version) and JScript (MS) are
implementations of the standardised ECMAScript, with some kind of
document object model put on top.

Jul 17 '05 #10

P: n/a
"Daniel Tryba" <pa**********@invalid.tryba.nl> wrote in message
news:42*********************@news6.xs4all.nl...
Tony Marston <to**@nospam.demon.co.uk> wrote:
The term "scripting" commonly refers to programming in a language that is interpreted directly from the source. PHP, Perl,
Are you sure? What does the Zend engine do? And I found this:
http://www.perl.com/doc/manual/html/lib/B/Bytecode.html
and Javascript would fit the description,
MS ships a javascript compiler.
whereas C# and Java do not, because code written in them goes through
an intermediate compilation stage.


Note that Java is not compiled into executable code. It is compiled
into intermediate code which is then converted into machine-specific
instructions by the current JVM.


You are confusing Java the Language with a JVM implementation. gcj will
happily compile java directly into native code.

All these definitions of script vs. language are totally silly, there
are too many exceptions out there.


Were you that drunk European guy I saw the other day who ran around shouting
"Which one?! Which one?!" when they played God Bless America on television?
;-)
Jul 17 '05 #11

P: n/a

"Daniel Tryba" <pa**********@invalid.tryba.nl> wrote in message
news:42*********************@news6.xs4all.nl...
Tony Marston <to**@nospam.demon.co.uk> wrote:
The term "scripting" commonly refers to programming in a language that
is
interpreted directly from the source. PHP, Perl,
Are you sure? What does the Zend engine do? And I found this:
http://www.perl.com/doc/manual/html/lib/B/Bytecode.html
and Javascript would fit the description,
MS ships a javascript compiler.
whereas C# and Java do not, because code written in them goes through
an intermediate compilation stage.
Note that Java is not compiled into executable code. It is compiled
into intermediate code which is then converted into machine-specific
instructions by the current JVM.


You are confusing Java the Language with a JVM implementation. gcj will
happily compile java directly into native code.


There may now be a method of compiling Java source code into
machine-specific instructions, but the original idea behind Java was "write
once, run anywhere". The "run anywhere" was limited to those hardware
platforms which had a JVM which carried out the task of translating the
compiled intermediate code into the executable code required by that
particular machine. In those circumstances it it wrong to say that Java is a
compiled language as it actually takes two stages, with the second being
performed at runtime. This is exactly what the Zend optimiser does.
All these definitions of script vs. language are totally silly, there
are too many exceptions out there.


I agree entirely.

--
Tony Marston

http://www.tonymarston.net

Jul 17 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.