1. Last minute Beta suggestions
- Posted by _tom (admin) Feb 02, 2010
- 1260 views
if ? is good then ?? is better
We now have ? for quick and easy display of a object, in its natural numeric format.
It would be handy if ?? could display an object as if it were string data. This could be a kind of pretty_print() without arguments.
sequence test = "try this" ? test -- {116,114,121,32,116,104,105,115} ?? test -- "try this"
- it would be very convenient for developing programs
- it would make introducing Euphoria to newcomers much easier
- it would make example and tutorial programs simple
loop until
The syntax for loop until breaks the Euphoria pattern.
currently:
loop do a = a*2 x = x-1 until x < 0
Could this be at least allowed as an "alternative" syntax?
loop do a = a*2 x = x-1 until x < 0 end loop
The "end" keyword is fundamental to current Euphoria syntax. In the documentation we now have to explain (apologize) that this has a "distinctive form."
For example, it is generally clear that scope for a syntax element finishes at the "end" keyword. In "loop do" this no longer applies.
It would be best if the patterns of syntax now in Euphoria are maintained.
2. Re: Last minute Beta suggestions
- Posted by DerekParnell (admin) Feb 02, 2010
- 1229 views
Or maybe ? could be made to be a little more intelligent. But in any case, I think this idea can wait for 4.1.
- it would be very convenient for developing programs
- it would make introducing Euphoria to newcomers much easier
- it would make example and tutorial programs simple
loop until
The syntax for loop until breaks the Euphoria pattern.
currently:
loop do a = a*2 x = x-1 until x < 0
Could this be at least allowed as an "alternative" syntax?
loop do a = a*2 x = x-1 until x < 0 end loop
The "end" keyword is fundamental to current Euphoria syntax. In the documentation we now have to explain (apologize) that this has a "distinctive form."
For example, it is generally clear that scope for a syntax element finishes at the "end" keyword. In "loop do" this no longer applies.
It would be best if the patterns of syntax now in Euphoria are maintained.
I agree that loop is an exception, but making the 'end loop' optional would also be an exception. To be consistent, 'end loop' should be mandatory, but then it makes the construct a bit unwieldy.
I've changed my local copy of Euphoria to allow 'end loop' to be optional and it is not a large change (7 lines of code) so if we agree, it can be added immediately.
3. Re: Last minute Beta suggestions
- Posted by DerekParnell (admin) Feb 02, 2010
- 1237 views
I forgot to mention that we almost have this now.
include std/console.e display("test string") display(12.34) display(56)
gives ...
test string 12.34 56
4. Re: Last minute Beta suggestions
- Posted by jimcbrown (admin) Feb 02, 2010
- 1255 views
I've changed my local copy of Euphoria to allow 'end loop' to be optional and it is not a large change (7 lines of code) so if we agree, it can be added immediately.
It should be mandatory or not allowed. Allowing it to be optional means the code itself won't be consistent...
5. Re: Last minute Beta suggestions
- Posted by _tom (admin) Feb 03, 2010
- 1151 views
Please add the "end loop" (as the only choice) to the Beta. The display() routine means that ideas like ?? can until for the 4.1 release.
6. Re: Last minute Beta suggestions
- Posted by jimcbrown (admin) Feb 03, 2010
- 1210 views
Please add the "end loop" (as the only choice) to the Beta. The display() routine means that ideas like ?? can until for the 4.1 release.
As long as until and end loop are not required to be on the same line (as in the example posted previously), I'm fine with this.
e.g.
loop do ... until X end loop
I'm guessing this is already the case in Derek's changes, but I just want to make sure...
7. Re: Last minute Beta suggestions
- Posted by kinz Feb 03, 2010
- 1144 views
Please add the "end loop" (as the only choice) to the Beta. The display() routine means that ideas like ?? can until for the 4.1 release.
As long as until and end loop are not required to be on the same line (as in the example posted previously), I'm fine with this.
e.g.
loop do ... until X end loop
I'm guessing this is already the case in Derek's changes, but I just want to make sure...
This construct is very bad at all. The Russian translation of "until" is "do teh por, poka", and "loop" is extra word here. So I'd like:
do ... while X end do
Or just abandon it for ever, please.
But ?? seems to be very nice, I like this idea very much.
kinz
8. Re: Last minute Beta suggestions
- Posted by jimcbrown (admin) Feb 03, 2010
- 1150 views
Please add the "end loop" (as the only choice) to the Beta. The display() routine means that ideas like ?? can until for the 4.1 release.
As long as until and end loop are not required to be on the same line (as in the example posted previously), I'm fine with this.
e.g.
loop do ... until X end loop
I'm guessing this is already the case in Derek's changes, but I just want to make sure...
This construct is very bad at all. The Russian translation of "until" is "do teh por, poka", and "loop" is extra word here. So I'd like:
do ... while X end do
Or just abandon it for ever, please.
kinz
do .. while .. end do ; has an opposite meaning than ; loop do .. until .. end loop
I don't see a problem with having the russian version use do .. until .. end do and the english version use loop do .. until .. end loop, however.
9. Re: Last minute Beta suggestions
- Posted by kinz Feb 03, 2010
- 1147 views
do .. while .. end do ; has an opposite meaning than ; loop do .. until .. end loop
We have
while X -- check for condition X **before** doing do ... end while
And we can have
do ... while Y -- check for condition Y **after** doing end do
All depends on conditions X and Y, see?
And we do not need the new "loop" and "until" key words.
I don't see a problem with having the russian version use do .. until .. end do and the english version use loop do .. until .. end loop, however.
Hey, Jim, do you speak Russian?
Then, code has to be translated word-to-word to avoid any confusion.
kinz
10. Re: Last minute Beta suggestions
- Posted by kinz Feb 03, 2010
- 1147 views
Tom, your idea about ?? seems to be excellent!
Congrats!
kinz
11. Re: Last minute Beta suggestions
- Posted by kinz Feb 03, 2010
- 1142 views
Tom, your idea about ?? seems to be excellent!
Congrats!
kinz
12. Re: Last minute Beta suggestions
- Posted by jimcbrown (admin) Feb 03, 2010
- 1142 views
do .. while .. end do ; has an opposite meaning than ; loop do .. until .. end loop
We have
while X -- check for condition X **before** doing do ... end while
And we can have
do ... while Y -- check for condition Y **after** doing end do
All depends on conditions X and Y, see?
No.
do ... while Y -- check for condition Y **after** doing, if Y is false then exit loop end do
do ... until Y -- check for condition Y **after** doing, if Y is true then exit loop end do
And we do not need the new "loop" and "until" key words.
It is true that 'until X' could be replaced with 'while not(X)'
I don't see a problem with having the russian version use do .. until .. end do and the english version use loop do .. until .. end loop, however.
Hey, Jim, do you speak Russian?
Then, code has to be translated word-to-word to avoid any confusion.
With the correct documentation, I don't see this as being strictly necessary. Jumping from "loop do" to the Russian version of "do" and from "end loop" to the Russian for "end do" doesn't seem to be very difficult for a human being to do.
For an automated code parser (e.g. that translates code from russian to english and back), some extra work is required, but no more than the what would be required to change Eu's parser to use 'while' in the manner that you suggest.
13. Re: Last minute Beta suggestions
- Posted by kinz Feb 03, 2010
- 1135 views
These double messages 10 and 11 seems to be produced by the Reload button pressed in browser on the Thanks page. Is it a bug or feature if so?
kinz
14. Re: Last minute Beta suggestions
- Posted by jimcbrown (admin) Feb 03, 2010
- 1128 views
These double messages 10 and 11 seems to be produced by the Reload button pressed in browser on the Thanks page. Is it a bug or feature if so?
kinz
It is a known issue in the forum software, with a bug in the bug tracker.
15. Re: Last minute Beta suggestions
- Posted by SDPringle Feb 04, 2010
- 1157 views
I like the "end loop" idea. It is consistent with other ways of ending branching and looping constructs.
Shawn Pringle
16. Re: Last minute Beta suggestions
- Posted by jeremy (admin) Feb 06, 2010
- 973 views
These double messages 10 and 11 seems to be produced by the Reload button pressed in browser on the Thanks page. Is it a bug or feature if so?
kinz
It is a known issue in the forum software, with a bug in the bug tracker.
Really? You can hit refresh and it double posts? Ug!
Jeremy
17. Re: Last minute Beta suggestions
- Posted by jeremy (admin) Feb 06, 2010
- 991 views
Or, are you pressing "Reload" on the "Message posted OK" page? I can see that happening.
Jeremy
18. Re: Last minute Beta suggestions
- Posted by kinz Feb 07, 2010
- 949 views
Or, are you pressing "Reload" on the "Message posted OK" page? I can see that happening.
Jeremy
There is the specialised thread on this issue - "test".
Yes, if I press "Reload" on the "Message posted OK" page, then message posts again.
kinz
19. Re: Last minute Beta suggestions
- Posted by gsalmeri Feb 07, 2010
- 963 views
- Last edited Feb 08, 2010
I wholeheartedly agree with the "end loop" proposal. When I read for the first time the specs of Euphoria 4.0, I thought I would never use the loop / until construct because of its inconsistent syntax. (Euphoria 4.0 is however a huge improvement: a great thanks to all the developers!)