[Types-sig] New syntax?

Greg Stein gstein@lyra.org
Thu, 16 Dec 1999 13:28:28 -0800 (PST)


On Thu, 16 Dec 1999, Martijn Faassen wrote:
> Paul Prescod wrote:
> > There are two separate issues here. Separate files and separate
> > syntaxes. And there are two different time periods here: today and in
> > Python 2.
> > 
> > Separate files are a necessity to handle C-coded types.
> 
> Um? Why?
> 
> > Ergo anything on
> > top of that is more work and given that we are still talking about
> > something useful in a month (though that is looking less and less
> > likely) I am not inclined to take on the extra work of new operators and
> > an inline syntax.
> 
> What about putting this extra information inside the module file itself?
> You need a separate file because you want to come up with your own
> syntax, but even then you can do:
> 
> __types__ = """
...
> """
> 
> which incidentally would be a neat Pythonic syntax. :)

Really. We don't want a separate syntax.

Think about the parsing. Who is going to parse it? Are you suggesting that
we have the Python parser doing some code parsing, then we invoke another
parser to parse interface information, then we pass those blobs off to the
compiler (and type inferencer/checker/optimizer/etc) ?

No way. Use one parser for code and interface information.

Inline vs. external is a different question (and I vote for former). But
different syntaxes is a big problem that is easily avoided.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/