Software Maintenance and Prototype Based Languages

I read this article and just thought… wow

http://osnews.com/story.php?news_id=6523

many reasons why people should choose an interpreted language (Ruby) rather
than a compiled language (C++/Java).

···


Simon Strandgaard

I read this and I thought that teh author was talking about
image-based languages, I can’t see how prototypes has relevance in his
talk.
Someone would mind explaining why prototypes are better than clases or
viceversa ?

···

il Mon, 29 Mar 2004 22:36:46 +0200, Simon Strandgaard neoneye@adslhome.dk ha scritto::

I read this article and just thought… wow

Software Maintenance and Prototype Based Languages – OSnews

many reasons why people should choose an interpreted language (Ruby) rather
than a compiled language (C++/Java).

Hello,

Simon Strandgaard wrote:

I read this article and just thought… wow

Software Maintenance and Prototype Based Languages – OSnews

many reasons why people should choose an interpreted language (Ruby) rather
than a compiled language (C++/Java).


Simon Strandgaard

I develop a ruby/tk app, and although there is no compilation, the app’s
startup time is painfully long (ruby/tk is slow, and I have old
hardware); and I didn’t talk about the time of get into the state where
I can check my modificiations.

Many times the modification do not involve big changes, just, for
example, some methods internals. Is it possible (in practice) that after
I have modified my source code (e.g. a method definition) I could
“reload” the file’s content into my running app? Do somebody use
something like that?

Bye,
Ferenc

The author doesn’t seem to know about open classes, or singleton methods
either.

One of his main objections to classes is
“Even if you can edit the class at run time (as some experienced Java
programmers do) you’re going to have to kill the existing objects of
that class and make new ones.”

···

On Wed, Mar 31, 2004 at 08:09:24PM +0900, gabriele renzi wrote:

I read this and I thought that teh author was talking about
image-based languages, I can’t see how prototypes has relevance in his
talk.
Someone would mind explaining why prototypes are better than clases or
viceversa ?


Running Debian GNU/Linux Sid (unstable)
batsman dot geo at yahoo dot com

Not only Guinness - Linux is good for you, too.
– Banzai on IRC

gabriele renzi wrote:

I read this and I thought that teh author was talking about
image-based languages, I can’t see how prototypes has relevance in his
talk.
Someone would mind explaining why prototypes are better than clases or
viceversa ?

My opinion:

Prototype-based languages are not better than class-based langauages,
and vice versa. Rather, it is just another way of architecting
software, a different way of viewing the world. Ultimately, anything
that can be done in one can be done in another.

There are aspects of prototype-based languages that appeal to me–it
simplifies the whole class/object dichotomy (which even Ruby suffers
from–why do you think so many people get confused when you start saying
that a Class is an Object? Or when you start talking about singleton
classes?). However, prototypes suffer from their own problems,
too–it’s not a panacea.

I imagine most people here saw the announcement on Slashdot a few days
ago for “Prothon” (a prototype-based language based on Python). I once
felt that I was ambitiious enough to create a prototype-based version of
Ruby, but didn’t make very much progress on it. Eventually, I think it
would be neat to have one, just to play with. Like I said, it simplifies
the class/object issue, since there are no classes, only objects.

My $0.02.

···


Jamis Buck
jgb3@email.byu.edu
http://www.jamisbuck.org/jamis

ruby -h | ruby -e
‘a=;readlines.join.scan(/-(.)[e|Kk(\S*)|le.l(…)e|#!(\S*)/) {|r| a <<
r.compact.first };puts “\n>#{a.join(%q/ /)}<\n\n”’

I discovered it on c.l.py but from the long threads started I could
not understand what’s wrong with class-based languages :slight_smile:

There were people there pointing out how prototypes solved metaclasses
complication, but I rarely had problem with that complication in ruby.
I believe metaclasses in python are sort of hard to get, but not in
ruby.
And there are languages like java with no metaclasses at all, no?

Anyway, worth noting that ruby should be quoted as an ancestor of
prothon too ( words of the author) :slight_smile:

···

il Wed, 31 Mar 2004 23:19:19 +0900, Jamis Buck jgb3@email.byu.edu ha scritto::

I imagine most people here saw the announcement on Slashdot a few days
ago for “Prothon” (a prototype-based language based on Python).

“gabriele renzi” surrender_it@remove.yahoo.it schrieb im Newsbeitrag
news:1cll6097cj2vidu37i3rqbq91aidjsvecb@4ax.com

il Wed, 31 Mar 2004 23:19:19 +0900, Jamis Buck jgb3@email.byu.edu ha
scritto::

I imagine most people here saw the announcement on Slashdot a few days
ago for “Prothon” (a prototype-based language based on Python).

I discovered it on c.l.py but from the long threads started I could
not understand what’s wrong with class-based languages :slight_smile:

There were people there pointing out how prototypes solved metaclasses
complication, but I rarely had problem with that complication in ruby.
I believe metaclasses in python are sort of hard to get, but not in
ruby.
And there are languages like java with no metaclasses at all, no?

Java has meta classes: java.lang.Class and then all classes in
java.lang.reflect.

C++ is OO but has only verly little meta information at runtime (i.e. only
type codes AFAIK).

IMHO the general tendency is to make meta information about types
available at runtime. Many newer languages do so (Java, C#…).

Anyway, worth noting that ruby should be quoted as an ancestor of
prothon too ( words of the author) :slight_smile:

:slight_smile:

robert