Rosetta Code:Village Pump/Example ordering: Difference between revisions

FWIW...
No edit summary
(FWIW...)
 
(One intermediate revision by the same user not shown)
Line 14:
{{task example list}}</nowiki></pre>
:Then the task page would only have to be edited when the description needs to change. Maybe there could be an "Add example" button. In any case, at that point SMW would sort for us, and it would be uniform across the whole site. Until then think we can sort languages that start with the same letters by length and that should handle most of the sorting problems. If any more arise we can fix them manually and then record a rule somewhere. --[[User:Mwn3d|Mwn3d]] 18:19, 11 September 2010 (UTC)
 
''From a dupliacte topic''
Each task page has the languages in alphabetical order, but the order of C# and F# is not consistent. Some pages have C# before C++. Some pages have C# after C++. Some pages have F# before Factor. Some pages have F# after Forth. [[Comments]] has C# before Chef, but F# after Fortran.
 
I guess that the best order is C# before C++, and F# before Factor. What is the best order? --[[User:Kernigh|Kernigh]] 18:06, 10 May 2011 (UTC)
:I think it should be C, C#, C++, Chef,... and F#, Factor, Fortran, ... --[[User:Mwn3d|Mwn3d]] 18:13, 10 May 2011 (UTC)
:For what it's worth, I wrote this quick little Java program:
:<lang java5>public static void main(String[] args) {
List<String> list= Arrays.asList("C","C++","C#","Chef", "C@", "C@q");
Collections.sort(list);
System.out.println(list);
}</lang>
:and it gave me this:
:<pre>[C, C#, C++, C@, C@q, Chef]</pre>
:I don't think Java does anything weird, so that will probably be what most other automatic, ASCII sorts do. --[[User:Mwn3d|Mwn3d]] 19:55, 10 May 2011 (UTC)
Anonymous user