Object Oreinted

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Academic Q

    Object Oreinted

    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
  • Andy Hassall

    #2
    Re: Object Oreinted

    On 4 Apr 2005 14:13:13 -0700, cshih16@yahoo.c om (Academic Q) wrote:
    [color=blue]
    >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..[/color]

    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 / <andy@andyh.co. uk> / <http://www.andyh.co.uk >
    <http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool

    Comment

    • Chung Leong

      #3
      Re: Object Oreinted

      "Academic Q" <cshih16@yahoo. com> wrote in message
      news:35f6bd0f.0 504041313.727eb 56e@posting.goo gle.com...[color=blue]
      > 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[/color]

      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.


      Comment

      • Berislav Lopac

        #4
        Re: Object Oreinted

        Chung Leong wrote:[color=blue]
        > "Academic Q" <cshih16@yahoo. com> wrote in message
        > news:35f6bd0f.0 504041313.727eb 56e@posting.goo gle.com...[color=green]
        >> 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[/color]
        >
        > 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.[/color]

        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, "interprete d" 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


        Comment

        • Micha³ Wo¼niak

          #5
          Re: Object Oreinted

          Berislav Lopac napisa³:
          [color=blue]
          > Chung Leong wrote:[color=green]
          >> "Academic Q" <cshih16@yahoo. com> wrote in message
          >> news:35f6bd0f.0 504041313.727eb 56e@posting.goo gle.com...[color=darkred]
          >>> 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[/color]
          >>
          >> 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.[/color]
          >
          > 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, "interprete d"
          > 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[/color]

          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 "interprete d" as a synonim and "languages that are run
          straight from the sources, without any compilation phase in between" as
          the definition.

          Cheers
          Mike

          Comment

          • Berislav Lopac

            #6
            Re: Object Oreinted

            Micha³ Wo¼niak wrote:[color=blue]
            > Besides, JavaScript is called JavaScript for some reason, isn't it?
            > Namely it's a scripting language similar to Java.[/color]

            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.
            [color=blue]
            > And those JS's "long-term memory effects" usually last a few minutes
            > at the most. How long can someone browse a single webpage?[/color]

            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.
            [color=blue]
            > Thus, I'd say that JavaScript fits nicely and neatly into the
            > "scripting languages" category defined this way.[/color]

            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


            Comment

            • Tony Marston

              #7
              Re: Object Oreinted


              "Chung Leong" <chernyshevsky@ hotmail.com> wrote in message
              news:Q_KdnXSrkq Lzs8_fRVn-uQ@comcast.com. ..[color=blue]
              > "Academic Q" <cshih16@yahoo. com> wrote in message
              > news:35f6bd0f.0 504041313.727eb 56e@posting.goo gle.com...[color=green]
              >> 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[/color]
              >
              > 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.
              >[/color]

              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

              This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL




              Comment

              • Daniel Tryba

                #8
                Re: Object Oreinted

                Tony Marston <tony@nospam.de mon.co.uk> wrote:[color=blue][color=green]
                >> The term "scripting" commonly refers to programming in a language that is
                >> interpreted directly from the source. PHP, Perl,[/color][/color]

                Are you sure? What does the Zend engine do? And I found this:

                [color=blue][color=green]
                >> and Javascript would fit the description,[/color][/color]

                MS ships a javascript compiler.
                [color=blue][color=green]
                >> whereas C# and Java do not, because code written in them goes through
                >> an intermediate compilation stage.[/color]
                >
                > 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.[/color]

                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.

                Comment

                • Berislav Lopac

                  #9
                  Re: Object Oreinted

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

                  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


                  Comment

                  • Daniel Tryba

                    #10
                    Re: Object Oreinted

                    Berislav Lopac <berislav.lopac @lopsica.com> wrote:[color=blue][color=green]
                    >> You are confusing Java the Language with a JVM implementation. gcj
                    >> will happily compile java directly into native code.[/color]
                    >
                    > 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.[/color]

                    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.

                    Comment

                    • Chung Leong

                      #11
                      Re: Object Oreinted

                      "Daniel Tryba" <partmapsswen@i nvalid.tryba.nl > wrote in message
                      news:42527960$0 $144$c5fe704e@n ews6.xs4all.nl. ..[color=blue]
                      > Tony Marston <tony@nospam.de mon.co.uk> wrote:[color=green][color=darkred]
                      > >> The term "scripting" commonly refers to programming in a language that[/color][/color][/color]
                      is[color=blue][color=green][color=darkred]
                      > >> interpreted directly from the source. PHP, Perl,[/color][/color]
                      >
                      > Are you sure? What does the Zend engine do? And I found this:
                      > http://www.perl.com/doc/manual/html/lib/B/Bytecode.html
                      >[color=green][color=darkred]
                      > >> and Javascript would fit the description,[/color][/color]
                      >
                      > MS ships a javascript compiler.
                      >[color=green][color=darkred]
                      > >> whereas C# and Java do not, because code written in them goes through
                      > >> an intermediate compilation stage.[/color]
                      > >
                      > > 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.[/color]
                      >
                      > 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.
                      >[/color]

                      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?
                      ;-)


                      Comment

                      • Tony Marston

                        #12
                        Re: Object Oreinted


                        "Daniel Tryba" <partmapsswen@i nvalid.tryba.nl > wrote in message
                        news:42527960$0 $144$c5fe704e@n ews6.xs4all.nl. ..[color=blue]
                        > Tony Marston <tony@nospam.de mon.co.uk> wrote:[color=green][color=darkred]
                        >>> The term "scripting" commonly refers to programming in a language that
                        >>> is
                        >>> interpreted directly from the source. PHP, Perl,[/color][/color]
                        >
                        > Are you sure? What does the Zend engine do? And I found this:
                        > http://www.perl.com/doc/manual/html/lib/B/Bytecode.html
                        >[color=green][color=darkred]
                        >>> and Javascript would fit the description,[/color][/color]
                        >
                        > MS ships a javascript compiler.
                        >[color=green][color=darkred]
                        >>> whereas C# and Java do not, because code written in them goes through
                        >>> an intermediate compilation stage.[/color]
                        >>
                        >> 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.[/color]
                        >
                        > You are confusing Java the Language with a JVM implementation. gcj will
                        > happily compile java directly into native code.[/color]

                        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.
                        [color=blue]
                        > All these definitions of script vs. language are totally silly, there
                        > are too many exceptions out there.[/color]

                        I agree entirely.

                        --
                        Tony Marston

                        This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL




                        Comment

                        Working...