Re: A 'Python like' language

2012-03-02 Thread dreamingforward
On Tuesday, March 30, 2004 12:31:35 AM UTC-7, Mark Hahn wrote:
> > --Take advantage of iterators early on for return values to avoid
> > things like having both dict.items() and dict.iteritems().
> 
> Interestiong idea.  Generators are fully supported so I could do this now.
> So gens would have to be allowed absolutely everywhere lists are allowed (is
> trhis possible?).  Or are you thinking the user should type
> List(dict.items()) ?

No, the former.  Most of the time you never really use a full, naked list 
anyway, generally only for documentation purposes.

> > --Choose "{:}" syntax for empty dict creation to reserve "{}" for
> > sets.  (Or: use "{}" for both, and do automatic "set-to-dict
> 
> Also cool.  Maybe <> for sets?  Prothon doesn't support <> as != so it is
> free.

I strongly suggest the standard (in math anyway) syntax for set notation.  It 
shouldn't be hard to parse whether code syntax is referring to a set vs. dict.

> > --Functions that return multiple, but unique, values should return a
> > set, not a list, to communicate same (ex: dict.keys(), dir(), etc.).
> 
> Also cool.

This is something that still hasn't really been implemented in PythonV3. 
 
> > --Dict should inherit from Set.
> 
> Also cool (I feel like the credits of Holy Grail saying Also wik).

An alternative is to create a named association type, similar to the ABC 
programming language, denoted by the colon.  "name": [].  A dict then would 
simply be a set of these.  Having a compound type would come in handy in 
several other ways too.

> > --With prothon's "immutability" bit and other considerations, does the
> > language need both tuples AND lists?
> 
> I like this a lot.  Tuples are already implemented internally as lists.

I think, in fact, that the object model could be more unified.  Under such a 
new object model, the worries about having a full library becomes rather 
pointless, as the new model will require a revamping of everything.

> More like a few dollars.  This is really good stuff.  Can I talk you into
> hanging out on the Prothon list now and then, at least until we get the core
> language sorted out?

Haha, a little late, but consider this a restart.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: A 'Python like' language

2012-03-02 Thread dreamingforward
On Tuesday, March 30, 2004 6:01:01 AM UTC-7, Gerrit wrote:
> > > --Dict should inherit from Set.
> > 
> > Also cool (I feel like the credits of Holy Grail saying Also wik).
> 
> I have read (in c.l.py) that in Smalltalk, a Dict is a Set of Associates
> or something similar. I don't know Smalltalk, but I like this idea of a
> Set.

Yeah, I like this too.  I take it from the ABC language.  The thing that's 
relevant (and apropos to Paul Rubin's objection), is that when unifying models, 
you have to decide "where the decimal point is" from which all the different 
dimensions that the language is encoding and silently tracking can pivot 
around.  The ":" of a compound is a sort of decimal point.   Then the task is 
finding a formalism in which to define and incorporate all the relavent 
dimensions into one.  The result will be necessarily recursive, revolving 
around the notions of the "atomic" versus the "group" and the transition rules 
that govern them.  

mark (aka zipher)
-- 
http://mail.python.org/mailman/listinfo/python-list