1. On Gotos and the long thread - some thoughts
- Posted by christian.cuvier at education.gouv.fr Aug 26, 2002
- 413 views
C'est un message de format MIME en plusieurs parties. ------=_NextPart_000_0152_01C24D31.A9A38F40 charset="iso-8859-1" Hi everyone ! I'm afraid some of us might miss the main issue while talking about = the dreaded Goto. (*) Since Euphoria's interpreter is not open source, the community = does not have the final word on the features that will be added. RDS = has. So, IMO, the issue is not: "Should goto be added?". The community is = divided on this, as the length of the thread shows. It is:"Will RDS (be = persuaded to) add goto to Euphoria?". The only thing the bickering suggests is a "Wait and see" attitude. = The sad-looking statement on the future of "continue" shows it quite = neatly, I think. (*) is not completely true, since one can always buy the source and = produce one's own interpreter. This is likely to require a high-volume = investment in time for understanding the source, properly modifying it = and insufficiently testing it (never forget tha Murphy was an optimist). = And the issues of portability, compatibility, licensing etc etc start = coming up. My personal stance on *goto*: it isn't either good or bad. Coding is = good or bad, the evauating criteria being readibility and = maintainability of source. I coded quite a few things in Basic and never = needed goto, so it wouldn't bother me. On structured programming. May I attempt to give a definition? A project is a sequence of statements that are expected to perform = several things (the functional specs). The more a coding scheme can be = matched again these specs, the more structured it is. A language is said = to be structured if it encourages and allows structured coding. So, you can code in a structured way even in assembly language. But = the "encourages" criterium is not met, so we generally consider it as an = unstructured language. Pascal, for instance, is so rigid that you are forced to code in a = structured way. But sometimes the structure is not the one you need. C = and Euphoria seem to stand somehow in an acceptable compromise. Goto and structured coding. True, Kat, any flow control instruction is a goto somehow, so all of = them can be replaced by a goto on a lexical standpoint. But not on a = semantical standpoint. Consider the two following cases, lexically equivalent: A: According to the result of some test, one of two or more program = blocks are to be executed. They just reflect an alternative, and are = equivalent in programmer's mind. The if/then/else.. construct (or = select/case) tranlates quite correctly the flow picture the programmer = has in mind while coding. B: In a special case, identified by the result of some test, things get = out of the general case frame, which the main program block is about. = Then, some form of *goto* (goto,exit,resume,whatever...) reflects more = closely the picture in programmer's mind, even though he may have to use = the if/then/else construct for the interpreter/compiler to output an = executable that performs as expected. So, the absence or presence of gotos is not even a sign of = structuredness. A good language would allow a programmer to speak his = mind freely while being understandable by an interpreter/compiler in the = appropriate way, and by other programmers who will follow on the = project. This looks like an utopia; and one may go some steps forward or = backward in this direction. Euphoria has a more intuitive treatment of = sequence (forward), but a limited treatment of loops and branching = (backward). Have a nice day! CChris (don't want to steal Bensler's signature - apologies) ------=_NextPart_000_0152_01C24D31.A9A38F40 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 5.50.4616.200" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2> Hi everyone = !</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2> I'm afraid some of = us might miss=20 the main issue while talking about the dreaded Goto.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2> (*) Since Euphoria's = interpreter is not open source, the community does not have the = final word=20 on the features that will be added. RDS has.</FONT></DIV> <DIV><FONT face=3DArial size=3D2> So, IMO, the = issue is not:=20 "Should goto be added?". The community is divided on this, as the length = of the=20 thread shows. It is:"Will RDS (be persuaded to) add goto to=20 Euphoria?".</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2> The only thing the = bickering=20 suggests is a "Wait and see" attitude. The sad-looking statement on the = future=20 of "continue" shows it quite neatly, I think.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2> (*) is not = completely true,=20 since one can always buy the source and produce one's own interpreter. = This is=20 likely to require a high-volume investment in time for understanding the = source,=20 properly modifying it and insufficiently testing it (never forget tha = Murphy was=20 an optimist). And the issues of portability, compatibility, licensing = etc etc=20 start coming up.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2> My personal stance = on *goto*: it=20 isn't either good or bad. Coding is good or bad, the evauating criteria = being=20 readibility and maintainability of source. I coded quite a few things in = Basic=20 and never needed goto, so it wouldn't bother me.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2> On structured=20 programming.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2> May I attempt to = give a=20 definition?</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2> A project is a = sequence of=20 statements that are expected to perform several things (the functional = specs).=20 The more a coding scheme can be matched again these specs, the more = structured=20 it is. A language is said to be structured if it encourages and allows=20 structured coding.</FONT></DIV> <DIV><FONT face=3DArial size=3D2> So, you can code in = a structured=20 way even in assembly language. But the "encourages" criterium is not = met, so we=20 generally consider it as an unstructured language.</FONT></DIV> <DIV><FONT face=3DArial size=3D2> Pascal, for = instance, is so=20 rigid that you are forced to code in a structured way. But sometimes the = structure is not the one you need. C and Euphoria seem to stand = somehow in=20 an acceptable compromise.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2> Goto and structured=20 coding.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2> True, Kat, any flow = control=20 instruction is a goto somehow, so all of them can be replaced by a goto = on a=20 lexical standpoint. But not on a semantical standpoint.</FONT></DIV> <DIV><FONT face=3DArial size=3D2> Consider the two = following=20 cases, lexically equivalent:</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>A: According to the result of some = test, one of two=20 or more program blocks are to be executed. They just reflect an = alternative, and=20 are equivalent in programmer's mind. The if/then/else.. construct (or=20 select/case) tranlates quite correctly the flow picture the programmer = has in=20 mind while coding.</FONT></DIV> <DIV><FONT face=3DArial size=3D2>B: In a special case, identified by the = result of=20 some test, things get out of the general case frame, which the main = program=20 block is about. Then, some form of *goto* (goto,exit,resume,whatever...) = reflects more closely the picture in programmer's mind, even though he = may have=20 to use the if/then/else construct for the interpreter/compiler to output = an=20 executable that performs as expected.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2> So, the absence or = presence of=20 gotos is not even a sign of structuredness. A good language would allow = a=20 programmer to speak his mind freely while being understandable by an=20 interpreter/compiler in the appropriate way, and by other programmers = who will=20 follow on the project. This looks like an utopia; and one may go some = steps=20 forward or backward in this direction. Euphoria has a more intuitive = treatment=20 of sequence (forward), but a limited treatment of loops and branching=20 (backward).</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2> Have a nice = day!</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2> CChris (don't want = to steal=20 Bensler's signature - apologies)</FONT></DIV> ------=_NextPart_000_0152_01C24D31.A9A38F40--
2. Re: On Gotos and the long thread - some thoughts
- Posted by Igor Kachan <kinz at peterlink.ru> Aug 26, 2002
- 390 views
Hello christian.cuvier, ---------- Îò: christian.cuvier at education.gouv.fr Êîìó: EUforum <EUforum at topica.com> Òåìà: On Gotos and the long thread - some thoughts Äàòà: 26 àâãóñòà 2002 ã. 20:52 <snip> for just one very important point. >Euphoria has a more intuitive treatment of sequence >(forward), but a limited treatment of loops and >branching (backward). Sorry please, but I can not agree here with the "limited" word. We have to remember Euphoria performs the giant amount of inner - so to say hidden - loops, branchings and other auxiliary things. See please, almost any operation on sequences is just very fast hidden complicated well optimized loop. And we have flexible mechanism of spaghetti-resistant high level loops. We just have these good things under our fingers every moment of programming in EU and forget about them, same as about fresh air or about good health. Robast programming - let us remember all senses of this R in the euphoRia word. Regards, Igor Kachan kinz at peterlink.ru
3. Re: On Gotos and the long thread - some thoughts
- Posted by pampeano at rocketmail.com Aug 26, 2002
- 384 views
Hi Christian, I just want to correct some definitions here. Open source != Free Software. Euphoria IS open source, it ISN'T free software. Best Regards, Guillermo Bonvehi --- christian.cuvier at education.gouv.fr wrote: > community does not have the final word on the features that will be > added. RDS has.
4. Re: On Gotos and the long thread - some thoughts
- Posted by David Cuny <dcuny at LANSET.COM> Aug 26, 2002
- 372 views
Guillermo wrote: > Open source != Free Software. True. > Euphoria IS open source, it ISN'T free software. Not true according to the "official" definition. See: http://www.opensource.org/docs/definition_plain.php More simply: OSS is software for which the source code is freely and publicly available, though the specific licensing agreements vary as to what one is allowed to do with that code. http://www.gnu.org/philosophy/free-software-for-freedom.html Euphoria source code is not freely available. Ergo, it's not Open Source. -- David Cuny
5. Re: On Gotos and the long thread - some thoughts
- Posted by christian.cuvier at education.gouv.fr Aug 27, 2002
- 377 views
----- Original Message ----- From: "Igor Kachan" <kinz at peterlink.ru> To: "EUforum" <EUforum at topica.com> Subject: Re: On Gotos and the long thread - some thoughts >>Euphoria has a more intuitive treatment of sequence >>(forward), but a limited treatment of loops and >>branching (backward). >Sorry please, but I can not agree here with >the "limited" word. > >We have to remember Euphoria performs the giant amount >of inner - so to say hidden - loops, branchings and >other auxiliary things. You have a point. I think the statement is correct anyway when adding "programmer level" between "of" and "loops". I did not have the opportunity to delve into Eupphoria's internals, so I take your word at face value. Only the explicit branching treatment is limited, and there may be a lot of things underwater. By the way, is not "structuredness" a large part of robustness? Regards. CChris
6. Re: On Gotos and the long thread - some thoughts
- Posted by Igor Kachan <kinz at peterlink.ru> Aug 27, 2002
- 375 views
Hello Christian, ---------- > Îò: christian.cuvier at education.gouv.fr > Êîìó: EUforum <EUforum at topica.com> > Òåìà: Re: On Gotos and the long thread - some thoughts > Äàòà: 27 àâãóñòà 2002 ã. 13:32 > > ----- Original Message ----- > From: "Igor Kachan" <kinz at peterlink.ru> > To: "EUforum" <EUforum at topica.com> > Subject: Re: On Gotos and the long thread - some thoughts > > >>Euphoria has a more intuitive treatment of sequence > >>(forward), but a limited treatment of loops and > >>branching (backward). > > >Sorry please, but I can not agree here with > >the "limited" word. > > > >We have to remember Euphoria performs the giant amount > >of inner - so to say hidden - loops, branchings and > >other auxiliary things. > > You have a point. I think the statement is correct > anyway when adding > "programmer level" between "of" and "loops". The "loops" and "branchings" are the fundamental things in programming. So, if you say "limited" about these things in EU, the better way is to show the strongly concrete example, were EU's native loops and branchings *can not resolve* your concrete programming task. What does your "limited" mean? I am convinced that EU native loops and branchings are the excellent and efficient antispaghetti protection, not any limitation. This is just very light discipline, not more. This is principle, not *limitation*. Karl developed interpreter with some other discipline, use it, it is very similar to EU, but it is not EU now. Karl's work is very interesting, but I have some habits and prefer the pure EU discipline. > I did not have the opportunity to delve into > Eupphoria's internals, so I take your word at > face value. Only the explicit branching treatment > is limited, and there may be a lot of things > underwater. Yes, there may be a lot of different things underwater, just I'm retired Russian atomic submariner, cool answer about underwater, no ? All retired military men love to boast about their service very much, yes. Or no????? And all retired military men love a good discipline very much. EU has the very good but the very light discipline, yes!!!!! One of my programs in EU was a historical model of one old ship's control panel - about 400 buttons on 4 screens, 35000 EU operators, developed in EU 2.1 PD with 300 statements limitation on run time diagnostics. After translation to C with E2C translator, that proggy had 2.5M C source code in 50 files. I am not owner of that code now, but you can see some chunks in the polyglot package. Try to develop such the program in C with gotos, but without any discipline - 2.5M of source is not a joke. > By the way, is not "structuredness" a large > part of robustness? I know that Euphoria is very&very&very ROBUST programming system, but what is "structuredness" -- this is very&very blurred, indistinct and vague term. Same as "free" and "open", just by the way For example, in Russian, English "free" has more than 50 variants of translation, and "open" - more than 50 variants and half of them are just same for "free" and for "open". Cool, no? See "Free" and "Open" licences with detailed explanation what is what & who is who. I just can not understand and remember those what is who & who is what. But the "robust" word has only 2 main and 1 rare translation. Same as EU PD and EU CE. PD is PD. For CE just visit http://www.RapidEuphoria.com/reg.htm This is Euphoria language, E&U&P&H&O&R&I&A & "" All things are clear things as a classical military order to the brave and strong warriors - interpreter & translator. Regards, Igor Kachan kinz at peterlink.ru