Re: Two Tier, call_ str_ fix

Mukhsein Johari <[email protected]> Thu, 15 Jul 2004 09:56:34 +0100 (BST)
Newsgroups gmane.comp.lang.prothon.user
Message-ID <[email protected]>
--- Paul Prescod <[email protected]> wrote: > Mukhsein
Johari wrote:
> > 
> > I'm not sure what the problem is here :-(
> 
> Try this program:
> 
> !/usr/local/bin/prothon
> 
> print(Int)
> print(Float)
> print(String)

Lets see...
O>> print(Int)
0
O>> print(Float)
0
O>> print(String)

O>>

I have a feeling that this is a symptom of a deeper
problem. instCall_: seems rather inelegent.

> 
> >...
> > Maybe what we need is simply a change of syntax?
> > 
> > Instead of this:
> > ob = MyObj()
> > 
> > To specify that ob is an object that inherits
> MyObj's
> > attributes, why not:
> > 
> > ob = MyObj.inherit()
> 
> I proposed that new object instantation be separated
> from call_, but 
> Mark Hahn said that they had already discussed it
> and decided against. I 
> would still be in favour.
> 
>
http://www.prothon.org/pipermail/prothon-user/2004-June/002339.html

Oh well. I guess prothon is not going to be as simple
(in concept) as I thought.

> 
> >...  After all, prothon is protoype-based,
> > right? Which means we don't use blueprint-like
> > constructs like class.
> 
> In English the word "prototype" does in fact refer
> to something you use 
> as a blueprint. "We've got a prototype of a
> velveeta-powered car and we 
> hope to go into production next year." Similarly in
> Prothon, you almost 
> always want hundreds of "instances" for each
> prototype.

Are you sure?
---------------------
pro·to·type    ( P )  Pronunciation Key  (prt-tp)
n.

   1. An original type, form, or instance serving as a
basis or standard for later stages.
   2. An original, full-scale, and usually working
model of a new product or new version of an existing
product.
   3. An early, typical example.
   4. Biology. A form or species that serves as an
original type or example.
---------------------

A prototype is not merely a blueprint, it is usually a
working (after a fashion) thing. A blueprint is just a
design - it doesn't 'work', as such. Classes are like
that.

A 'classless' language was what intrigued me in the
first place about prothon.

> Anyhow, I think that the "object" keyword was always
> just syntactic 
> sugar for inherit+with.
> 

I guess I can live with that.

________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html