[Types-sig] New syntax?
Martijn Faassen
m.faassen@vet.uu.nl
Thu, 16 Dec 1999 22:47:43 +0100
Greg Stein wrote:
[snip Pythonic syntax stuff I perversely proposed]
> 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) ?
That's not really what I'm proposing; I was proposing using Python at
least for the first shot at things. But, this does appear to be what
Paul's proposing. Paul doesn't consider writing a new parser a problem,
I do think it'll hold us back when we could better be discussing
semantics. But since Paul thinks syntax is important I'm obliging with
something that seems Pythonic. Because I'm Dutch I get bonus points
anyway. ;)
> No way. Use one parser for code and interface information.
All right:
foo = 1:
def bar(i, j):
return i + j
vardef bar(int, int):
return int
class Foo:
alpha = 1
def __init__(self, beta):
self.beta = beta
def getbeta(self):
return self.beta
varclass Foo:
alpha: int
def __init__(self, int):
self.beta: int
def getbeta(self):
result: int
:) # not part of syntax
> Inline vs. external is a different question (and I vote for former). But
> different syntaxes is a big problem that is easily avoided.
So what are you suggesting if you would be voting for external, then? A
Python based system such as the one I proposed earlier? Or is this why
you're voting for internal?
Regards,
Martijn