Skip to main content
Copy edited (e.g. ref. <https://en.wikipedia.org/wiki/JavaScript>). Expanded. Dressed the naked links (the third seems to be broken (times out)).
Source Link
lennon310
  • 3.2k
  • 7
  • 18
  • 34

As I painfully try to find a good natural sorting algorithm written in JavaScript, I then stumble upon a bunch of different implementations, interesting blog posts, and answers on Stack OverflowStackOverflow.

Each implementation provides its technical tricks. However, the more I looked into it the more a question became very clear: "Is there actually any language-agnostic specification regarding natural sorting order of strings?"

I mean, if not, then how could one expect to write a piece of code that is actually "correct for everyone" or "agreed on by the community"? I would have expected a specification stating the result of the compromises/decisions made, at least for English, as it is simple (no accents/diacritics)...

Note that I wrote "language-agnostic" as I would expect this specification to then be used to implement solutions in different languages, not only in JavaScript, C#, or Java.

Resources:

As I painfully try to find a good natural sorting algorithm written in JavaScript, I then stumble upon a bunch of different implementations, interesting blog posts, and answers on Stack Overflow.

Each implementation provides its technical tricks. However, the more I looked into it the more a question became very clear: "Is there actually any language-agnostic specification regarding natural sorting order of strings?"

I mean, if not, then how could one expect to write a piece of code that is actually "correct for everyone" or "agreed on by the community"? I would have expected a specification stating the result of the compromises/decisions made, at least for English, as it is simple (no accents/diacritics)...

Note that I wrote "language-agnostic" as I would expect this specification to then be used to implement solutions in different languages, not only in JavaScript, C#, or Java.

Resources:

As I painfully try to find a good natural sorting algorithm written in JavaScript, I then stumble upon a bunch of different implementations, interesting blog posts, and answers on StackOverflow.

Each implementation provides its technical tricks. However, the more I looked into it the more a question became very clear: "Is there actually any language-agnostic specification regarding natural sorting order of strings?"

I mean, if not, then how could one expect to write a piece of code that is actually "correct for everyone" or "agreed on by the community"? I would have expected a specification stating the result of the compromises/decisions made, at least for English, as it is simple (no accents/diacritics)...

Note that I wrote "language-agnostic" as I would expect this specification to then be used to implement solutions in different languages, not only in JavaScript, C#, or Java.

Resources:

Copy edited (e.g. ref. <https://en.wikipedia.org/wiki/JavaScript>). Expanded. Dressed the naked links (the third seems to be broken (times out)).
Source Link

Is there anya language-agnostic specification for "String Natural Sorting Order""string natural sorting order"?

As I painfully try to find a good natural sorting algorithm written in JavaScript, I then stumble upon a bunch of different implementations, & interesting blog posts &, and answers on Stack Overflow Overflow.

Each implementation provides its technical tricks. However, however the more I looked into it the more a question became very clear: "is"Is there actually any language-agnostic specification regarding natural sorting ORDERorder of strings???"

I mean, if not, then how could one expect to write a piece of code that is actually "correct for everyone" or "agreed on by the community"? I would have expected a specspecification stating the result of the compromises/decisions made, at least for English, as it is simple (no accents/diacritics)  ...

Note that I wrote "language-agnostic" as I would expect this specspecification to then be used to implement solutions in different languages, not only in javascript or C#JavaScript, C#, or JavaJava.

Resources:

Is there any language-agnostic specification for "String Natural Sorting Order"

As I painfully try to find a good natural sorting algorithm written in JavaScript I then stumble upon a bunch of different implementations, & interesting blog posts & answers on Stack Overflow.

Each implementation provides its technical tricks, however the more I looked into it the more a question became very clear: "is there actually any language-agnostic specification regarding natural sorting ORDER of strings???"

I mean, if not, then how could one expect to write a piece of code that is actually "correct for everyone" or "agreed on by the community"? I would have expected a spec stating the result of the compromises/decisions made, at least for English, as it is simple (no accents/diacritics)  ...

Note that I wrote "language-agnostic" as I would expect this spec to then be used to implement solutions in different languages, not only in javascript or C# or Java.

Resources:

Is there a language-agnostic specification for "string natural sorting order"?

As I painfully try to find a good natural sorting algorithm written in JavaScript, I then stumble upon a bunch of different implementations, interesting blog posts, and answers on Stack Overflow.

Each implementation provides its technical tricks. However, the more I looked into it the more a question became very clear: "Is there actually any language-agnostic specification regarding natural sorting order of strings?"

I mean, if not, then how could one expect to write a piece of code that is actually "correct for everyone" or "agreed on by the community"? I would have expected a specification stating the result of the compromises/decisions made, at least for English, as it is simple (no accents/diacritics)...

Note that I wrote "language-agnostic" as I would expect this specification to then be used to implement solutions in different languages, not only in JavaScript, C#, or Java.

Resources:

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

As I painfully try to find a good natural sorting algorithm written in JavaScript I then stumble upon a bunch of different implementations, & interesting blog posts & answers on Stack Overflow.

Each implementation provides its technical tricks, however the more I looked into it the more a question became very clear: "is there actually any language-agnostic specification regarding natural sorting ORDER of strings???"

I mean, if not, then how could one expect to write a piece of code that is actually "correct for everyone" or "agreed on by the community"? I would have expected a spec stating the result of the compromises/decisions made, at least for English, as it is simple (no accents/diacritics) ...

Note that I wrote "language-agnostic" as I would expect this spec to then be used to implement solutions in different languages, not only in javascript or C# or Java.

Resources:

As I painfully try to find a good natural sorting algorithm written in JavaScript I then stumble upon a bunch of different implementations, & interesting blog posts & answers on Stack Overflow.

Each implementation provides its technical tricks, however the more I looked into it the more a question became very clear: "is there actually any language-agnostic specification regarding natural sorting ORDER of strings???"

I mean, if not, then how could one expect to write a piece of code that is actually "correct for everyone" or "agreed on by the community"? I would have expected a spec stating the result of the compromises/decisions made, at least for English, as it is simple (no accents/diacritics) ...

Note that I wrote "language-agnostic" as I would expect this spec to then be used to implement solutions in different languages, not only in javascript or C# or Java.

Resources:

As I painfully try to find a good natural sorting algorithm written in JavaScript I then stumble upon a bunch of different implementations, & interesting blog posts & answers on Stack Overflow.

Each implementation provides its technical tricks, however the more I looked into it the more a question became very clear: "is there actually any language-agnostic specification regarding natural sorting ORDER of strings???"

I mean, if not, then how could one expect to write a piece of code that is actually "correct for everyone" or "agreed on by the community"? I would have expected a spec stating the result of the compromises/decisions made, at least for English, as it is simple (no accents/diacritics) ...

Note that I wrote "language-agnostic" as I would expect this spec to then be used to implement solutions in different languages, not only in javascript or C# or Java.

Resources:

Tweeted twitter.com/#!/StackProgrammer/status/519201410412707840
Post Reopened by Bart van Ingen Schenau, psr, Daenyth, yannis
added the fact the question focusses on the sorting "order" rather than the algorithm used
Source Link
Adriano
  • 181
  • 10
Loading
Post Closed as "Opinion-based" by jwenting, amon, gnat, user53019, user40980
added "language-agnostic" as it is the main point of the question
Source Link
Adriano
  • 181
  • 10
Loading
Formatting
Source Link
Josh Kelley
  • 11.1k
  • 7
  • 40
  • 50
Loading
Source Link
Adriano
  • 181
  • 10
Loading