[Haskell-cafe] Re: [Off topic] Proving an impossibility

2007-09-05 Thread Jon Fairbairn
Sterling Clover <[EMAIL PROTECTED]> writes: > of course you could rewrite this in a while loop too > although you'd have to use an assignment, but at least > still not one with a silly "done" variable. People seem to have overlooked the bit of Algol68 I posted, so I'll repeat it While If E

Re: [Haskell-cafe] Re: [Off topic] Proving an impossibility

2007-09-04 Thread Sterling Clover
You get the logic and code blowup problems that require either local variables, breaks, gotos, or continuations because you're working with tests that generate side-effects. Mixing side-effects and tests is going to generate a goto, sure, but if the code was rewritten in a functional style

Re: [Haskell-cafe] Re: [Off topic] Proving an impossibility

2007-09-04 Thread Tillmann Rendel
Vimal wrote: Ah, yes, it is possible in this case, but you have used an extra variable. It is okay, but our professor doesnt want to put emphasis on Computability here (or maybe I dont realize it), but the point is: Are such programming constructs really necessary in a programming language? i.e.

Re: [Haskell-cafe] Re: [Off topic] Proving an impossibility

2007-09-04 Thread Vimal
> > I hadn't interpreted the "reminding of Knuth" that way. I > wouldn't count break as a goto -- what makes goto especially > nasty is that the destination isn't indicated by the > structure of the source; it could be just anywhere. Break is > slightly more structured. > Maybe you might need to t

[Haskell-cafe] Re: [Off topic] Proving an impossibility

2007-09-04 Thread Jon Fairbairn
"Brandon S. Allbery KF8NH" <[EMAIL PROTECTED]> writes: > On Sep 4, 2007, at 5:02 , Miguel Mitrofanov wrote: > >>> It depends on arbitrary restrictions on what constitutes an >>> (boolean) expression, something that is anathema to >>> functional programmers :-) Spot the language: >>> while if E >>>

Re: [Haskell-cafe] Re: [Off topic] Proving an impossibility

2007-09-04 Thread Brandon S. Allbery KF8NH
On Sep 4, 2007, at 5:02 , Miguel Mitrofanov wrote: It depends on arbitrary restrictions on what constitutes an (boolean) expression, something that is anathema to functional programmers :-) Spot the language: while if E then S; F else False fi do T od It reminds me of a paper

[Haskell-cafe] Re: [Off topic] Proving an impossibility

2007-09-04 Thread Jon Fairbairn
Miguel Mitrofanov <[EMAIL PROTECTED]> writes: >> > It reminds me of a paper by Knuth, where he states that >> > "goto" statement is necessary; don't remember the title, >> > however. >> I don't remember needing a goto in Haskell... > > Well, for imperative languages, of course. I think my point i

Re: [Haskell-cafe] Re: [Off topic] Proving an impossibility

2007-09-04 Thread Miguel Mitrofanov
> It depends on arbitrary restrictions on what constitutes an > (boolean) expression, something that is anathema to > functional programmers :-) Spot the language: > while if E > then S; F > else False > fi > do T > od > > It reminds me of a paper by Knuth, where he states that >

[Haskell-cafe] Re: [Off topic] Proving an impossibility

2007-09-04 Thread Jon Fairbairn
Miguel <[EMAIL PROTECTED]> writes: >>On 9/3/07,Vimal<[EMAIL PROTECTED]> wrote: >>>while E do >>>S >>>if F then >>>break >>>end >>>T >>>end >>> >>>He then asked us to *prove* that the above programming fragment cannot >>> >>>be implemented just using if and while statement, even if S and T can >>>b