Re: Optional static typing

2014-08-14 Thread Skip Montanaro
On Thu, Aug 14, 2014 at 12:02 AM, Steven D'Aprano wrote: > Does anyone here use function annotations? If so, what do you use them > for? I've used them a little when converting Python to Cython, though I readily admit that I have no idea if what Cython accepts as a type declaration is compatible

Optional static typing

2014-08-13 Thread Steven D'Aprano
The BDFL Guido van Rossum is considering optional static typing (ish) for Python 3.5: https://mail.python.org/pipermail/python-ideas/2014-August/028618.html Does anyone here use function annotations? If so, what do you use them for? -- Steven -- https://mail.python.org/mailman/listinfo

Re: optional static typing for Python

2008-01-30 Thread Wildemar Wildenburger
Kay Schluehr wrote: > On Jan 30, 12:38 am, Wildemar Wildenburger > <[EMAIL PROTECTED]> wrote: >>> Python has a JIT right no >> You mean in the Java-sense (outputting native machine code)? >> >> /W > > Sure. > > http://psyco.sourceforge.net/ > Oh, switcheroo! :) /W -- http://mail.python.org/ma

Re: optional static typing for Python

2008-01-29 Thread Kay Schluehr
On Jan 30, 12:38 am, Wildemar Wildenburger <[EMAIL PROTECTED]> wrote: > > Python has a JIT right no > > You mean in the Java-sense (outputting native machine code)? > > /W Sure. http://psyco.sourceforge.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: optional static typing for Python

2008-01-29 Thread [EMAIL PROTECTED]
On 28 jan, 11:21, "Russ P." <[EMAIL PROTECTED]> wrote: > On Jan 28, 1:53 am, Bruno Desthuilliers > > > [EMAIL PROTECTED]> wrote: > > Russ P. a écrit : > > > > On Jan 27, 5:03 pm, Paddy > > > >> If static typing is optional then a program written in a dynamic > > >> language that passes such an aut

Re: optional static typing for Python

2008-01-29 Thread Wildemar Wildenburger
> Python has a JIT right no > You mean in the Java-sense (outputting native machine code)? /W -- http://mail.python.org/mailman/listinfo/python-list

Re: optional static typing for Python

2008-01-29 Thread Kay Schluehr
On 29 Jan., 17:00, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > Given the difficulty of statically analyzing Python, and the > limitations you need to add for either static typing or type inference > to be practical, I think that the real future for faster Python code > is JIT, not static optimizat

Re: optional static typing for Python

2008-01-29 Thread Chris Mellon
On Jan 28, 2008 10:31 AM, John Nagle <[EMAIL PROTECTED]> wrote: > Arnaud Delobelle wrote: > > On Jan 27, 11:00 pm, "Russ P." <[EMAIL PROTECTED]> wrote: > >> On Jan 27, 2:49 pm, "André" <[EMAIL PROTECTED]> wrote: > >>> Perhaps this:http://www.python.org/dev/peps/pep-3107/mightbe > >>> relevant? > >>

Re: optional static typing for Python

2008-01-29 Thread Ben Finney
"Russ P." <[EMAIL PROTECTED]> writes: > I would just like to thank you for reminding me about what losers > hang out perpetually on sites like this one, thinking they are in > some kind of real "community." Being reminded of that will help > prevent me from becoming such a loser myself. No, I didn

Re: optional static typing for Python

2008-01-28 Thread Arnaud Delobelle
On Jan 28, 4:31 pm, John Nagle <[EMAIL PROTECTED]> wrote: > Arnaud Delobelle wrote: [...] > > Note that annotations do not provide explicit typing, AFAIK: > > > def f(x:int) -> int: return x*2 > > > is stricly equivalent to > > > def f(x): return x*2 > > f.__annotations__ = {'x':int, 'return':int}

Re: optional static typing for Python

2008-01-28 Thread Marc 'BlackJack' Rintsch
On Mon, 28 Jan 2008 08:31:43 -0800, John Nagle wrote: > Unenforced static typing is somewhat pointless. If that > goes in, it should be enforced by implementations. Luckily we don't get static typing. We get annotations which *can* be used for type hints, checked by additional code. Can be

Re: optional static typing for Python

2008-01-28 Thread Boris Borcic
Wish you'd opted out of typing all that static. BB Russ P. wrote: (...) > > What is that supposed to mean? > > Oh, I almost forgot. I'm supposed to sit here and be polite while > clueless dolts make wise cracks. Sorry, but I haven't yet mastered > that level of self-control. > > I would just l

Re: optional static typing for Python

2008-01-28 Thread John Nagle
Arnaud Delobelle wrote: > On Jan 27, 11:00 pm, "Russ P." <[EMAIL PROTECTED]> wrote: >> On Jan 27, 2:49 pm, "André" <[EMAIL PROTECTED]> wrote: >>> Perhaps this:http://www.python.org/dev/peps/pep-3107/mightbe >>> relevant? >>> André >> Thanks. If I read this correctly, this PEP is on track for Python

Re: optional static typing for Python

2008-01-28 Thread Kay Schluehr
On 27 Jan., 23:19, "Russ P." <[EMAIL PROTECTED]> wrote: > A while back I came across a tentative proposal from way back in 2000 > for optional static typing in Python: > > http://www.python.org/~guido/static-typing > > Two motivations were given: > > --

Re: optional static typing for Python

2008-01-28 Thread Bjoern Schliessmann
Russ P. wrote: > On Jan 28, 1:51 am, Bruno Desthuilliers > Lord have mercy(tm). > > What is that supposed to mean? I suppose he wants to communicate that this is the nth time this topic is brought up (n=>infinite). Try searching the archives next time. Regards, Björn P.S.: IMHO, your flame i

Re: optional static typing for Python

2008-01-28 Thread Bruno Desthuilliers
Russ P. a écrit : > On Jan 28, 1:51 am, Bruno Desthuilliers [EMAIL PROTECTED]> wrote: >> Russ P. a écrit :> A while back I came across a tentative proposal from way >> back in 2000 >>> for optional static typing in Python: >> (snip) >> >>> In an

Re: optional static typing for Python

2008-01-28 Thread Diez B. Roggisch
> If Python could be automatically converted to Ada or Java, that could > potentially be used as a baseline for actual operational software. > That would capture the algorithmic details more reliably than recoding > from scratch by hand. But such an automatic conversion is not feasible > without ex

Re: optional static typing for Python

2008-01-28 Thread Torsten Bronger
Hallöchen! Russ P. writes: > On Jan 28, 1:51 am, Bruno Desthuilliers [EMAIL PROTECTED]> wrote: >> Russ P. a écrit :> A while back I came across a tentative proposal from way > back in 2000 >> > for optional static typing in Python: >> >> (snip) >&g

Re: optional static typing for Python

2008-01-28 Thread cokofreedom
On Jan 28, 11:42 am, "Russ P." <[EMAIL PROTECTED]> wrote: > On Jan 28, 1:51 am, Bruno Desthuilliers > > > [EMAIL PROTECTED]> wrote: > > Russ P. a écrit :> A while back I came across a tentative proposal from way > > back in 2000 > > > for op

Re: optional static typing for Python

2008-01-28 Thread Russ P.
On Jan 28, 1:51 am, Bruno Desthuilliers wrote: > Russ P. a écrit :> A while back I came across a tentative proposal from way > back in 2000 > > for optional static typing in Python: > > (snip) > > > In any case, optional static typing in Python would help tremendou

Re: optional static typing for Python

2008-01-28 Thread Russ P.
On Jan 28, 1:53 am, Bruno Desthuilliers wrote: > Russ P. a écrit : > > > > > On Jan 27, 5:03 pm, Paddy > > >> If static typing is optional then a program written in a dynamic > >> language that passes such an automated static analysis of source code > >> would have to be a simple program written i

Re: optional static typing for Python

2008-01-28 Thread Paul Rubin
"Russ P." <[EMAIL PROTECTED]> writes: > You might want to check into what the FAA allows in "flight-critical" > code, for example. I am certainly not an expert in that area, but I've > had a passing exposure to it. My understanding is that every possible > branch of the code must be fully and metic

Re: optional static typing for Python

2008-01-28 Thread Bruno Desthuilliers
Russ P. a écrit : > On Jan 27, 5:03 pm, Paddy > >> If static typing is optional then a program written in a dynamic >> language that passes such an automated static analysis of source code >> would have to be a simple program written in a simplistic way, and >> also in a static style. > > Yes, bu

Re: optional static typing for Python

2008-01-28 Thread Bruno Desthuilliers
Russ P. a écrit : > A while back I came across a tentative proposal from way back in 2000 > for optional static typing in Python: > (snip) > In any case, optional static typing in Python would help tremendously > here. The hardest part of automated conversion of Python to a >

Re: optional static typing for Python

2008-01-27 Thread Paul Rubin
Paddy <[EMAIL PROTECTED]> writes: > > Fair enough. My main issue was against the notion that random testing > > is the only thing necessary. > > Sorry Paul if I may have given that impression, its just that when you > bring in random testing to a design that until then had only directed > tests y

Re: optional static typing for Python

2008-01-27 Thread Paddy
On Jan 28, 6:17 am, Paul Rubin wrote: > Paddy <[EMAIL PROTECTED]> writes: > > Given the complexity of current microprocessors i'm guessing that > > their previous testing methods would be too good to just junk in > > totality because the FDIV bug was not found. Similarly

Re: optional static typing for Python

2008-01-27 Thread Paul Rubin
Paddy <[EMAIL PROTECTED]> writes: > Given the complexity of current microprocessors i'm guessing that > their previous testing methods would be too good to just junk in > totality because the FDIV bug was not found. Similarly if they were > not using formal methods then it makes sense to add it too

Re: optional static typing for Python

2008-01-27 Thread Paddy
On Jan 28, 1:56 am, Paul Rubin wrote: > Paddy <[EMAIL PROTECTED]> writes: > > I would rather advocate such random test generation methods as being > > more appropriate for testing software in safety critical systems when > > the programming language is dynamic. > > That m

Re: optional static typing for Python

2008-01-27 Thread Kay Schluehr
On Jan 28, 12:22 am, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > On Jan 27, 11:00 pm, "Russ P." <[EMAIL PROTECTED]> wrote: > > > On Jan 27, 2:49 pm, "André" <[EMAIL PROTECTED]> wrote: > > > Perhaps this:http://www.python.org/dev/peps/pep-3107/mightbe > > > relevant? > > > André > > > Thanks. If I

Re: optional static typing for Python

2008-01-27 Thread Terry Reedy
"Russ P." <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] |> Perhaps this:http://www.python.org/dev/peps/pep-3107/might be relevant? | Thanks. If I read this correctly, this PEP is on track for Python 3.0. Wonderful! If you experiment with static analysis using annotations, I am sur

Re: optional static typing for Python

2008-01-27 Thread Russ P.
On Jan 27, 5:03 pm, Paddy > If static typing is optional then a program written in a dynamic > language that passes such an automated static analysis of source code > would have to be a simple program written in a simplistic way, and > also in a static style. Yes, but for safety-critical software

Re: optional static typing for Python

2008-01-27 Thread Paul Rubin
Paddy <[EMAIL PROTECTED]> writes: > I would rather advocate such random test generation methods as being > more appropriate for testing software in safety critical systems when > the programming language is dynamic. That method totally failed to find the Pentium FDIV bug, and they use static proof

Re: optional static typing for Python

2008-01-27 Thread Paddy
On Jan 27, 10:19 pm, "Russ P." <[EMAIL PROTECTED]> wrote: > A while back I came across a tentative proposal from way back in 2000 > for optional static typing in Python: > > http://www.python.org/~guido/static-typing > > Two motivations were given: > >

Re: optional static typing for Python

2008-01-27 Thread Christian Heimes
Arnaud Delobelle wrote: > On Jan 27, 11:00 pm, "Russ P." <[EMAIL PROTECTED]> wrote: >> On Jan 27, 2:49 pm, "André" <[EMAIL PROTECTED]> wrote: >>> Perhaps this:http://www.python.org/dev/peps/pep-3107/mightbe >>> relevant? >>> André >> Thanks. If I read this correctly, this PEP is on track for Python

Re: optional static typing for Python

2008-01-27 Thread ajaksu
On Jan 27, 9:13 pm, "Russ P." <[EMAIL PROTECTED]> wrote: > On Jan 27, 3:08 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > > > Russ P. pisze: > > > >>> I noticed that Guido has expressed further interest in static typing > > >>> three or four years ago on his blog. Does anyone know the current > > >>>

Re: optional static typing for Python

2008-01-27 Thread Arnaud Delobelle
On Jan 27, 11:00 pm, "Russ P." <[EMAIL PROTECTED]> wrote: > On Jan 27, 2:49 pm, "André" <[EMAIL PROTECTED]> wrote: > > Perhaps this:http://www.python.org/dev/peps/pep-3107/mightbe > > relevant? > > André > > Thanks. If I read this correctly, this PEP is on track for Python 3.0. > Wonderful! Note t

Re: optional static typing for Python

2008-01-27 Thread Russ P.
On Jan 27, 3:08 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > Russ P. pisze: > > >>> I noticed that Guido has expressed further interest in static typing > >>> three or four years ago on his blog. Does anyone know the current > >>> status of this project? Thanks. > >> I thought it was april fools jo

Re: optional static typing for Python

2008-01-27 Thread Jarek Zgoda
Russ P. pisze: >>> I noticed that Guido has expressed further interest in static typing >>> three or four years ago on his blog. Does anyone know the current >>> status of this project? Thanks. >> I thought it was april fools joke? > > On January 21, 2000? Which calendar do you use? Static typin

Re: optional static typing for Python

2008-01-27 Thread Russ P.
On Jan 27, 2:49 pm, "André" <[EMAIL PROTECTED]> wrote: > On Jan 27, 6:19 pm, "Russ P." <[EMAIL PROTECTED]> wrote: > > > > > A while back I came across a tentative proposal from way back in 2000 > > for optional static typing in Python: &

Re: optional static typing for Python

2008-01-27 Thread Russ P.
On Jan 27, 2:36 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > Russ P. pisze: > > > I noticed that Guido has expressed further interest in static typing > > three or four years ago on his blog. Does anyone know the current > > status of this project? Thanks. > > I thought it was april fools joke? On

Re: optional static typing for Python

2008-01-27 Thread André
On Jan 27, 6:19 pm, "Russ P." <[EMAIL PROTECTED]> wrote: > A while back I came across a tentative proposal from way back in 2000 > for optional static typing in Python: > > http://www.python.org/~guido/static-typing > > Two motivations were given: > >

Re: optional static typing for Python

2008-01-27 Thread Jarek Zgoda
Russ P. pisze: > I noticed that Guido has expressed further interest in static typing > three or four years ago on his blog. Does anyone know the current > status of this project? Thanks. I thought it was april fools joke? -- Jarek Zgoda http://zgodowie.org/ "We read Knuth so you don't have to

optional static typing for Python

2008-01-27 Thread Russ P.
A while back I came across a tentative proposal from way back in 2000 for optional static typing in Python: http://www.python.org/~guido/static-typing Two motivations were given: -- faster code -- better compile-time error detection I'd like to suggest a third, which could help e

Re: Status of optional static typing in Python?

2006-06-23 Thread John Roth
ure may become part of Python? Optional static typing is listed as item # 3 in PEP 3100 (Python 3.0 plans). For a timeline, look at PEP 3000. John Roth > > Thanks very much, > Christian > > > -- > Christian Convey > Computer Scientist, > Naval Undersea Warfare C

Re: Status of optional static typing in Python?

2006-06-22 Thread George Sakkis
Christian Convey wrote: > Perhaps I'm deluded but I don't think so. I'll tell you my situation > and I'd appreciate your take on it... > > I'm looking into the design a network simulator. The simulator has a > few requirements: > > (1) I need to be able to swap in a variety of replacement compon

Re: Status of optional static typing in Python?

2006-06-22 Thread Bruno Desthuilliers
Christian Convey a écrit : > Perhaps I'm deluded but I don't think so. . You are. > I'll tell you my situation > and I'd appreciate your take on it... > > I'm looking into the design a network simulator. The simulator has a > few requirements: > > (1) I need to be able to swap in a variety

Re: Status of optional static typing in Python?

2006-06-22 Thread Kay Schluehr
Christian Convey wrote: > Hi guys, > > I'm looking at developing a somewhat complex system, and I think some > static typing will help me keep limit my confusion. I.e.: > > http://www.artima.com/weblogs/viewpost.jsp?thread=87182 > > Does anyone know if/when that feature may become part of Python?

Re: Status of optional static typing in Python?

2006-06-22 Thread Christian Convey
Perhaps I'm deluded but I don't think so. I'll tell you my situation and I'd appreciate your take on it... I'm looking into the design a network simulator. The simulator has a few requirements: (1) I need to be able to swap in a variety of replacement components during different simulations.

Re: Status of optional static typing in Python?

2006-06-22 Thread Bruno Desthuilliers
Christian Convey a écrit : > Hi guys, > > I'm looking at developing a somewhat complex system, and I think some > static typing will help me keep limit my confusion. Then I think you're suffering from an alas too common delusion. Static typing (at least declarative static typing) will only ma

Status of optional static typing in Python?

2006-06-22 Thread Christian Convey
Hi guys, I'm looking at developing a somewhat complex system, and I think some static typing will help me keep limit my confusion. I.e.: http://www.artima.com/weblogs/viewpost.jsp?thread=87182 Does anyone know if/when that feature may become part of Python? Thanks very much, Christian -- C

Re: Optional Static Typing: Part II

2005-01-04 Thread Carl Banks
John Roth wrote: > http://www.artima.com/weblogs/viewpost.jsp?thread=86641 Nitpicking: I don't think he's necessarily in good company w.r.t. types vs classes. Take Ada, for example. In Ada, a class is a set of types (in particular, the type and all its subtypes), which is kind of the opposite w

Re: Optional Static Typing: Part II

2005-01-04 Thread Michael Hobbs
John Roth <[EMAIL PROTECTED]> wrote: > Now, the base objective seems to be to incorporate PyChecker > functionality into the root. This in turn requires type inference, > which in turn strongly suggests type annotations to help the > inferencer out over rough spots. > > I like this approach a lot.

Re: Optional Static Typing: Part II

2005-01-04 Thread Roman Suzi
On Tue, 4 Jan 2005, John Roth wrote: >Guido has posted a second blog entry on the optional static typing >initiative. >I like this a lot better than the first. Declarative approach is even more human-oriented than algorithmic one. If Python is to support declarations, let it support de

Optional Static Typing: Part II

2005-01-04 Thread John Roth
Guido has posted a second blog entry on the optional static typing initiative. I like this a lot better than the first. http://www.artima.com/weblogs/viewpost.jsp?thread=86641 Now, the base objective seems to be to incorporate PyChecker functionality into the root. This in turn requires type

Re: Optional Static Typing

2005-01-04 Thread Jacek Generowicz
[EMAIL PROTECTED] (Alex Martelli) writes: > I've always liked the (theoretical) idea that assertions (including of > course contracts) could be used as axioms used to optimize generated > code, rather than (necessarily) as a runtime burden. E.g. (and I don't > know of any implementation of this c

Re: Optional Static Typing

2004-12-28 Thread Ville Vainio
> "Ryan" == Ryan Paul <[EMAIL PROTECTED]> writes: Ryan> I wrote a blog post this morning in which I briefly argue Ryan> using DbC and predicate based argument constraints instead Ryan> of static typing. Take a look I took a look. The first impression is that there is too much stuf

Re: Optional Static Typing

2004-12-27 Thread Ryan Paul
On Thu, 23 Dec 2004 01:49:35 -0800, bearophileHUGS wrote: > Adding Optional Static Typing to Python looks like a quite complex > thing, but useful too: > http://www.artima.com/weblogs/viewpost.jsp?thread=85551 I wrote a blog post this morning in which I briefly argue using DbC and

Re: Optional Static Typing - Haskell?

2004-12-27 Thread Robin Becker
Scott David Daniels wrote: Then you need "Scott and Dave's Programming Language" -- SAD/PL. By providing separate data types for even and odd numbers, you can avoid off-by-one errors ;-) mmmhhh off by two-licious -- Robin Becker -- http://mail.python.org/mailman/listinfo/python-list

Re: Optional Static Typing

2004-12-27 Thread Ville Vainio
> "Alex" == Alex Martelli <[EMAIL PROTECTED]> writes: Alex> I've always liked the (theoretical) idea that assertions Alex> (including of course contracts) could be used as axioms used Alex> to optimize generated code, rather than (necessarily) as a Alex> runtime burden. E.g. (

Re: Optional Static Typing

2004-12-27 Thread Robert Kern
Luis M. Gonzalez wrote: Robert Kern wrote: Starkiller, at least, can deal with cases where a variable might be one of a set of types and generates code for each of this set. Explicit type declarations can help keep these sets small and reduces the number of times that Starkiller needs to fall ba

Re: Optional Static Typing - Haskell?

2004-12-27 Thread Scott David Daniels
Michael Hobbs wrote: I've always found that with Haskell, if I can get my program to compile without error, it usually runs flawlessly. (Except for the occasional off-by-one error. :-) Then you need "Scott and Dave's Programming Language" -- SAD/PL. By providing separate data types for even and odd

Re: Optional Static Typing

2004-12-27 Thread Alex Martelli
Michael Hobbs <[EMAIL PROTECTED]> wrote: > Your proposition reminds me very much of Design by Contract, which is > a prominent feature of the Eiffel programming language. Considering > that Python is an interpreted language where type checking would > naturally occur at runtime, I think Design by

Re: Optional Static Typing

2004-12-27 Thread Alex Martelli
Donn Cave <[EMAIL PROTECTED]> wrote: ... > > > Most of the kinds of error that static typing is supposed > > > to catch simply don't persist for more than a minute when > > > you do test driven development. > > > > ...which is exactly the point of the famous post by Robert ("Uncle Bob") > > Mar

Re: Optional Static Typing

2004-12-27 Thread Donn Cave
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Alex Martelli) wrote: > John Roth <[EMAIL PROTECTED]> wrote: >... > > question: static typing is an answer. What's the question? > > (That's a paraphrase.) > > > > The answer that everyone seems to give is that it > > prevents errors and cla

Re: Optional Static Typing - Haskell?

2004-12-27 Thread Michael Hobbs
Neal D. Becker <[EMAIL PROTECTED]> wrote: > I've just started learning about Haskell. I suggest looking at this for an > example. > > A good intro: http://www.haskell.org/tutorial > I've always found that with Haskell, if I can get my program to compile without error, it usually runs flawlessly

Re: Optional Static Typing

2004-12-27 Thread Michael Hobbs
Rahul <[EMAIL PROTECTED]> wrote: > I am assuming that optional type checking is being added for easier > debugging only. So if 'expects' are turned on , python raises > warnings(which do not halt the system) but not when they are turned > off. These will enable easier debugging for new people while

Re: Optional Static Typing - Haskell?

2004-12-27 Thread Mike Meyer
"Donn Cave" <[EMAIL PROTECTED]> writes: > Quoth Mike Meyer <[EMAIL PROTECTED]>: > | [EMAIL PROTECTED] (Alex Martelli) writes: > ... > |> But then, the above criticism applies: if interface and implementation > |> of a module are tightly coupled, you can't really do fully modular > |> programming A

Re: Optional Static Typing

2004-12-27 Thread Luis M. Gonzalez
Robert Kern wrote: > Starkiller, at least, can deal with cases where a variable might be one > of a set of types and generates code for each of this set. Explicit type > declarations can help keep these sets small and reduces the number of > times that Starkiller needs to fall back to PyObject_*

Re: Optional Static Typing - Haskell?

2004-12-27 Thread Alex Martelli
Donn Cave <[EMAIL PROTECTED]> wrote: ... > And you probably think Eiffel supports fully modular programming, as > I thought Objective CAML did. But Alex seems not to agree. Rather, I would say it's Dr Van Roy and Dr Haridi who do not agree; their definition of "truly open programming" being qu

Re: Optional Static Typing - Haskell?

2004-12-26 Thread Donn Cave
Quoth Mike Meyer <[EMAIL PROTECTED]>: | [EMAIL PROTECTED] (Alex Martelli) writes: ... |> But then, the above criticism applies: if interface and implementation |> of a module are tightly coupled, you can't really do fully modular |> programming AND static typing (forget type inferencing...). | | I

Re: Optional Static Typing

2004-12-26 Thread Robert Kern
Luis M. Gonzalez wrote: Robert Kern wrote: Automatic type inferencing is great, but sometimes the inference is "object". Being able to supply more information about types helps Starkiller keep the inferences tight and specific. Hmm... I'm not an expert in this subject at all, but I think that when

Re: Optional Static Typing - Haskell?

2004-12-26 Thread Mike Meyer
[EMAIL PROTECTED] (Alex Martelli) writes: > Mike Meyer <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] (Alex Martelli) writes: >> > Mind you, I personally _like_ the concept of describing >> > an interface separately, even in a different language (Corba's IDL, say) >> > that's specialized for the

Re: Optional Static Typing

2004-12-26 Thread Luis M. Gonzalez
Robert Kern wrote: > Automatic type inferencing is great, but sometimes the inference is > "object". Being able to supply more information about types helps > Starkiller keep the inferences tight and specific. Hmm... I'm not an expert in this subject at all, but I think that when the inference is

Re: Optional Static Typing - Haskell?

2004-12-26 Thread Alex Martelli
Mike Meyer <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] (Alex Martelli) writes: > > > Mind you, I personally _like_ the concept of describing > > an interface separately, even in a different language (Corba's IDL, say) > > that's specialized for the task. But it doesn't seem to be all that > >

Re: Optional Static Typing

2004-12-25 Thread Robert Kern
Luis M. Gonzalez wrote: I don't understand why this discussion on optional static typing came up right at this moment. As far as I know, it has been discussed many times in the past, and there even was a SIG that simply died... but it seems that it never was something of much interest to p

Re: Optional Static Typing - Haskell?

2004-12-25 Thread Mike Meyer
[EMAIL PROTECTED] (Alex Martelli) writes: > Mind you, I personally _like_ the concept of describing > an interface separately, even in a different language (Corba's IDL, say) > that's specialized for the task. But it doesn't seem to be all that > popular... without such separation, modularity plu

Re: Optional Static Typing

2004-12-25 Thread Luis M. Gonzalez
> > I don't understand why this discussion on optional static typing came > > up right at this moment. > > Because Guido made some notes on it. > > http://www.artima.com/weblogs/viewpost.jsp?thread=85551 > > merry christmas. > Stephen. Yes, I know Guido d

Re: Optional Static Typing

2004-12-25 Thread Rahul
I am assuming that optional type checking is being added for easier debugging only. So if 'expects' are turned on , python raises warnings(which do not halt the system) but not when they are turned off. These will enable easier debugging for new people while not affecting masters. Also,perhaps, it

Re: Optional Static Typing

2004-12-25 Thread Just
In article <[EMAIL PROTECTED]>, moma <[EMAIL PROTECTED]> wrote: > What about this? > u'int() = t, 6, 7, What about this? u'int() = t, 6, 7,' ...which is valid Python today. Just -- http://mail.python.org/mailman/listinfo/python-list

Re: Optional Static Typing

2004-12-25 Thread moma
[EMAIL PROTECTED] wrote: Adding Optional Static Typing to Python looks like a quite complex thing, but useful too: http://www.artima.com/weblogs/viewpost.jsp?thread=85551 I have just a couple of notes: Boo (http://boo.codehaus.org/) is a different language, but I like its "as" instead

Re: Optional Static Typing

2004-12-25 Thread gabriele renzi
Which raises what, to me, is the central question. If we have optional static typing, can I get a performance enhancement out of it? If not, why bother? for documentation and 'crash early' purposes, I'd say. Btw, why don't we rip out the approach of CL and some schemes that offer

Re: Optional Static Typing - Haskell?

2004-12-25 Thread Alex Martelli
Donn Cave <[EMAIL PROTECTED]> wrote: ... > | making a really modular system work with static typing and inferencing > | is probably impossible; in practice, the type inferencer must examine > | all code, or a rather copious summary of it... it can't really work > | module by module in a nice, fu

Re: Optional Static Typing

2004-12-24 Thread Stephen Thorne
On 24 Dec 2004 21:35:24 -0800, Luis M. Gonzalez <[EMAIL PROTECTED]> wrote: > I don't understand why this discussion on optional static typing came > up right at this moment. Because Guido made some notes on it. http://www.artima.com/weblogs/viewpost.jsp?thread=85551 merry c

Re: Optional Static Typing

2004-12-24 Thread Luis M. Gonzalez
I don't understand why this discussion on optional static typing came up right at this moment. As far as I know, it has been discussed many times in the past, and there even was a SIG that simply died... but it seems that it never was something of much interest to python developers (that

Re: Optional Static Typing - Haskell?

2004-12-24 Thread Donn Cave
Quoth [EMAIL PROTECTED] (Alex Martelli): | Donn Cave <[EMAIL PROTECTED]> wrote: ... | > He didn't dwell much on it, but there was some mention of type | > inference, kind of as though that could be taken for granted. | > I guess this would necessarily be much more limited in scope | > than what Has

Re: Optional Static Typing

2004-12-24 Thread Scott David Daniels
Rahul wrote: 1.def gcd(a,b) expects (int,int) I presume by this syntax you mean something like: def gcd(a, b) expects (int, int): if b > a: a, b = b, a while a > b > 0: a, b = b, a % b return a Here the function is not enforcing type checking. The

Re: Optional Static Typing - Haskell?

2004-12-24 Thread Alex Martelli
Donn Cave <[EMAIL PROTECTED]> wrote: > Quoth [EMAIL PROTECTED] (Alex Martelli): > ... > | Haskell's a great language, but beware: its static typing is NOT > | optional -- it's rigorous. It can INFER types for you (just like, say, > | boo), that's a different issue. It also allows bounded generic

Re: Optional Static Typing - Haskell?

2004-12-24 Thread Donn Cave
Quoth [EMAIL PROTECTED] (Alex Martelli): ... | Haskell's a great language, but beware: its static typing is NOT | optional -- it's rigorous. It can INFER types for you (just like, say, | boo), that's a different issue. It also allows bounded genericity at | compile time (like, say, C++'s template

Re: Koolaid (was Re: Optional Static Typing)

2004-12-24 Thread Tim Jarman
In article <[EMAIL PROTECTED]>, Peter Hansen <[EMAIL PROTECTED]> wrote: > > P.S.: The ironic thing about all this is that it was > actually something called "Flavor Aid", made by a > company called Jel Sert (http://www.jelsert.com), > and not Kool-Aid at all. What would be even funnier > is if

Re: Optional Static Typing

2004-12-24 Thread Michael Sparks
Rocco Moretti wrote: ... > Is there a group of people for whom static typing truly helps? Yes. Python doesn't at present compile down to a binary executable. (Py2exe don't really count since that's "just" tacking on a VM on the side (he says dimissively regarding something he thinks is cool :) )

Re: Optional Static Typing

2004-12-24 Thread Nick Coghlan
Mike Meyer wrote: Which raises what, to me, is the central question. If we have optional static typing, can I get a performance enhancement out of it? If not, why bother? I had some thoughts along the same lines, so I dug up PEP 246 and looked at how it could be enhanced to potentially support

Re: Optional Static Typing - Haskell?

2004-12-24 Thread Alex Martelli
7;s rigorous. It can INFER types for you (just like, say, boo), that's a different issue. It also allows bounded genericity at compile time (like, say, C++'s templates without the hassles), and that's yet another (typeclasses are a great mechanism, btw). Languages with really optional

Re: Optional Static Typing

2004-12-24 Thread Rahul
Hi. Well i am a newbie to python and maybe not qualified enough to make a comment on proposals to changes in python. My previous programming experience has been in Java and C. So maybe you will forgive me if i make any outlandish comments. But anyway here goes: I think instead what should be done

Re: Koolaid (was Re: Optional Static Typing)

2004-12-24 Thread Scott David Daniels
Tim Churches wrote: Peter Hansen <[EMAIL PROTECTED]> wrote: I always thought the connotation was more that those who "drank the Kool-Aid" were unthinking drones, following what others told them to do. I thought it was an allusion to "The Electric Kool-Aid Acid test" by Tom Wolfe - see http://en.wi

Re: Koolaid (was Re: Optional Static Typing)

2004-12-24 Thread Robert Kern
Tim Churches wrote: Peter Hansen <[EMAIL PROTECTED]> wrote: John Roth wrote: "Rocco Moretti" <[EMAIL PROTECTED]> wrote: The question is, should Guido state "TDD is the one true way to program in Python.", or should concessions be made in the language design for those who don't "drink the TDD Kool

Re: Optional Static Typing - Haskell?

2004-12-24 Thread Neal D. Becker
I've just started learning about Haskell. I suggest looking at this for an example. A good intro: http://www.haskell.org/tutorial -- http://mail.python.org/mailman/listinfo/python-list

Re: Optional Static Typing

2004-12-24 Thread Mike Meyer
ave static typing, and they simply don't need it. LISP has type declarations. Everybody I know doing production work in LISP uses them. It's the only way to get reasonable performance out of LISP compiled code. Which raises what, to me, is the central question. If we have optional static

Re: Optional Static Typing

2004-12-24 Thread Alex Martelli
John Roth <[EMAIL PROTECTED]> wrote: ... > question: static typing is an answer. What's the question? > (That's a paraphrase.) > > The answer that everyone seems to give is that it > prevents errors and clarifies the program. ... > Most of the kinds of error that static typing is supposed >

Re: Optional Static Typing

2004-12-24 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: > Adding Optional Static Typing to Python looks like a quite complex > thing, but useful too: > http://www.artima.com/weblogs/viewpost.jsp?thread=85551 > > I have just a couple of notes: Guido doesn't read this group; if you want him to rea

Re: Koolaid (was Re: Optional Static Typing)

2004-12-23 Thread Tim Churches
Peter Hansen <[EMAIL PROTECTED]> wrote: > > John Roth wrote: > > "Rocco Moretti" <[EMAIL PROTECTED]> wrote: > >> The question is, should Guido state "TDD is the one true way to > >> program in Python.", or should concessions be made in the language > >> design for those who don't "drink the TDD

  1   2   >