Re: Euphoria vs. other programming languages
- Posted by CChris Mar 12, 2009
- 1379 views
Further, even though the "global" keyword has been left in, its semantics have changed, to the effect of breaking most complex libraries available. win32lib is perhaps the most obvious example.
I've used Win32Lib with 4.0. So have others. Perhaps the example isn't as obvious as you think.
R. Stowasser has posted many instances of problems. The way w32start.ew works now is at best unpredictable, and it is central to the proper working of newUIObj().
Hi Chris,
actually I do not quite understand you. I once wrote to you that this quarrel is academic and that there are more ways to reach a goal. Many ways lead to Rome. If I report a problem then because I use Eu 4.0, because it is alpha, because I do not find a workaround for myself and because I trust into the development team. If I had your knowledge and your capabilities I would try to offer a solution myself. Really.
I did, but ayatollah Matt & Jeremy said there was nothing to discuss. [/quote RStowasser] Btw I would not insist on full compatibility between Eu 4.0 and 3.1.1 applications. [/quote] Most Eu coders are happy to have had time to write code that eventually works. When the compatibility breakage goes beyond cosmetic changes like variable names, it is quite unreasonable to ask them to rewrite, as the code organisation itself may be affected. The coder base is simply not large enough for the luxury you suggest. Perl could do it, not Eu.
Other languages do this neither with their versions. To port programs from 3.1.1 to 4.0 you have to change some keywords anyway. (label, entry, continue, switch, break). I will not use global with Eu 4.0.
As I said, a 10 minute nearly automated change process is acceptable, I think. You cannot get past it anyway, or not easily. Changing the semantics of the language is a completely different story.
And to be honest I would deprecate the use of global in Eu4.0 at all. Using the public and export keywords seem to be the better strategy to test and maintain separate modules / libraries. I do run my include files with exw/exwc to see if there are error messages. And although I like IDE and Win32lib they are also good examples in my opinion that they could be improved in Eu 4.0 only by using public and export. This would lead to a different structure of the include files, but I think this would also help to test and maintain the individual modules more effectively.
Roland
Why deprecate global? It has very legitimate uses. But alternative schemes should be provided so that it becomes useful only for special cases, just like goto.
I'll soon (in the next 6 hours I guess) post an alternate scheme. It ensures modularization, keeps the declare befor use paradigm, and keeps global unchanged - but in check. Its being unchecked has been indeed a prolem, which public attempted to solve, but with too bad collateral damage. Note that I am not directing much criticism towards export. export is fragile because a change in source system geometry will break it, but it is handy often enough to be kept, I think.
CChris