Talk:Sorting algorithms/Cycle sort: Difference between revisions

→‎4 REXXen: Thanks Gerard for the reply...
m (→‎number of writes: "struck-out" my bumbling questions.)
(→‎4 REXXen: Thanks Gerard for the reply...)
Line 18:
 
: Adding liberal (some may say copious) comments to program statements puts constraints to squishing (or limiting) the code statement width somewhat, unless comments are not in-line, or if longer (wider) lines are used.   One of my concerns about most computer programs in Rosetta Code is a surprising lack of comments --- but I realize that my opinions about program comments can be construed as perjorative.   I'd rather add many comments than have a program with no or few comments, even if it looks not as neat. It certainly looks less tidy with more comments.   Most REXX programmers don't need to read those comments, but I assume a lot of non-REXX (or novice) programmers do.   Previously, I was thinking about making various program sources wider to accommodate longer comments and longer statements, but there was a (previous) concern about long statements in Rosetta Code, and indeed, some programs (not mine) were flagged as having statements that are too long (wide).   (I haven't re-visited those pages to see if the flags are still there or if the problem has been corrected, or if that concern is still held -- as I recall, the statements in question were multiple IF statements and had no following comments attached on the same line.)   So I normally use a width of 74 characters for source statements.   And yes, it is idiomatic REXX (although not everyone uses that style), and any program can be made neater (tidy?) by having no comments, and by introducing more statements that are normally shown on one line (''if x=y then ↓ x=0'' instead of ''if x=y then x=0''), using superfluous DO groups and dead code, etc;   it's a matter of style (although superfluous DO groups and dead code is where I draw the line).   Same thing with indentation(s) with IF then/else, SELECT, and DO loops (I'm a firm believer in not using Egyptian indentations).   I prefer to view programs or functions/subroutines on a single screen (if possible) instead of scrolling.   I have yet to find a Classic REXX (interpreter) that executes version 1 (but of course, I haven't tested them all, but all of the REXXes I have installed on my PC, none do);   to that end, I wrote a Classic REXX solution that followed the Wiki algorithm.   I also added refinements to the program, and rather than making the program to hard to follow after the acute changes, I added several variants to make the changes easier to recognize from the original. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 00:01, 14 June 2014 (UTC)
 
::Thanks Gerard for the reply. I guess it is a matter of style, and knowing that you have considered things then that's fine.
::P.s. maybe you could ask for the REXX version that works with version 1 if you interested in confirming that it works on something? Or maybe not. Only if you are interested I guess. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 00:32, 14 June 2014 (UTC)
Anonymous user