First of all, note that I'll have to explain my thoughts in a layman's terms.
There are so many high-level programming languages out there that compete with each other. This means we have to build the same functionality over and over again in each language.
Therefore, I wonder the following:
Why isn't there one language that has come to dominate because it's the most efficient and the most robust, being built from the bottom up perfectly?
Of course, 'perfectly' isn't well defined, so let me try to explain what I mean by this.
As far as I'm aware, all operations on computers boil down to working with 1's and 0's. This makes me think that there's a better way to do things.
For example, take ASCII. Why is ASCII the way it is? It's arbitrary that M is 01101101
. This arbitrariness seems like it's the root of the problem; that if M's representation was determined by how and where M's manifested themselves in our data, that the processing language would be a common language, instead of ASCII.
First of all, am I way off base on this intuition? Secondly, let me provide an idea of what I think could at least partially solve this issue.
Imagine I had a functional language that took bits, transformed them in every way possible, and returned bits. I can only think of what this might look like with the constraint that the bits remain the same length. for example, it's functionality (higher level pseudocode) would look something like this:
proc get_transform_list(bit_list, desired_bit_list):
transform_list = []
current_bit_list = bit_list
for i in len(bit_list)^2:
affected_indices = get_list_of_one_indices_from_number(i) // returns list of 'on' indices in binary representation of i
wrong_indicies = get_list_of_bad_indicies(current_bit_list, desired_bit_list) // returns list of indices in current_bit_list that don't match the desired_bit_list
if {any wrong_indices match any affected_indices}:
transform_list.append(1)
new_bit_list = []
for x, bit in enumerate(current_bit_list):
if x in affected_indices:
new_bit_list.append(not bit)
else:
new_bit_list.append(bit)
current_bit_list = new_bit_list
else:
transform_list.append(0)
return transform_list
So I know that might be annoying to compile in your head so let me give you an example of what this does:
current_bit_list = 1110
desired_bit_list = 0111
we need to get the transform_bit_list for:
1110 -> 0111
| = flip - affected index
. = stay - non-affected index
0 = .... = 1110
1 = ...| = 1111
0 = ..|. = 1111 (corresponding indices are already accurate).
0 = ..|| = 1111 (corresponding indices are already accurate).
0 = .|.. = 1111 (corresponding indices are already accurate).
0 = .|.| = 1111 (corresponding indices are already accurate).
0 = .||. = 1111 (corresponding indices are already accurate).
0 = .||| = 1111 (corresponding indices are already accurate).
1 = |... = 0111
0 = |..| = 0111 (corresponding indices are already accurate).
0 = |.|. = 0111 (corresponding indices are already accurate).
0 = |.|| = 0111 (corresponding indices are already accurate).
0 = ||.. = 0111 (corresponding indices are already accurate).
0 = ||.| = 0111 (corresponding indices are already accurate).
0 = |||. = 0111 (corresponding indices are already accurate).
0 = |||| = 0111 (corresponding indices are already accurate).
||
|| > 0100000010000000
(flipping them all first which would be a reverse path is 0111011001111101)
the transition_bit_list is 0100000010000000
Using this method or something like it you can get from one bit representation to any other bit representation and you have an inherent list of representations between them (this inherent list comes from the structure of binary, but it could be something else).
I know the value and use for this kind of thing is so vague and esoteric, so let me get to the point and reiterate my question once again in a different way.
I guess what I'm trying to ask is: ascii is an example of an arbitrary protocol, but if we made all protocols dependant upon protocols below them wouldn't we have no arbitrary protocols, and therefore wouldn't we have just one universal programming language?