Wildest programming language idea
amasad (2480)

What is your wildest programming language idea? This could be fun (silly) ideas or really cool and useful ones.

Go!

Also on le twatter: https://twitter.com/replit/status/1275525512861900800

You are viewing a single comment. View All
Coder100 (4274)

I present...

Cxx

A static language that is weakly typed with implicit type coercion no matter what you do. For example:

int number = 5;
Console.Log(typeof number);

Your output will be:

<= Array[5]: [ Number, String, Boolean, Array, Null ]

Now, imagine you have another number:

int number2 = 10;

Adding them together gives:

<= "105"

Due to type coercion. Also, the same thing does not happen to strings:

String number1 = "5";
String number2 = "10";
Console.Log(number1 + number2);
<= Error: Cannot add two arrays

Due to strings being converted into Arrays.

Because of type coercion, this is logic:

5 == "100" => true // (both can be converted into booleans of true)
0 == 0 => false // (0 is not the same as false)
2 == 1 => true // (2 = true = 1)
"string" == "string" => false // (they have become arrays and require a deep equal in order to be true)
"5" == "2" => false // (same problem as above)
(Char)"5" == (Char)"2" => true // (both have become booleans due to explicit type)

Due to the nature of RegExp, RegExp has not been considered a type. It is considered a substance. A substance is that of a type, but it cannot be coerced for it is too pure. Substances are similar to classes, but they are not.

Substance.RegExp myRe = (new)Substance.RegExp(@"[^\d][\d\w]+"gi);
Console.Log(typeof myRe); => Substance.RegExp

Equalities with substances do not give you sane answers.

Substance.RegExp myRe = (new)Substance.RegExp(@"[^\d][\d\w]+"gi);
Substance.RegExp myRe2 = (new)Substance.RegExp(@".+"gi);
myRe == myRe2 => How Dare you Even Try To Compare Substances! Do you even know THE tRue Po𝑤͙͎̔̈́͠𝑒̦͔̙̓̓͌𝑟̡̫͌͑͘͜ o̸͖͚̓͆͠͝f̴̨̡̢̜͙̣̗͎̗̮̤̮̞̘̻͆̄̾̾͑̅͋͋̋͠ͅ ̶̧̧̡̱̳͔̙̬͈͈͍̗̊̌̊͌͑̓̍́̃͝s̴̢̨̞̩̱͈̙̥͖͎͖̭̣̠̓̔̔͊́̊̌̈̄̽̽̇̓͌͐͜͝ͅu̷̡̡̳̻̣̟͍̥͍͉̤̦̟̫͓̖͑̀̏͒̓͛̉̓̂̇ç̸̛͖̖̘̠̲̫̜̮̭̫͎̭͚̻̯̘̌͆̆̑͌̑̃̍̈́͒͊͘̕̚̚͝h̸̢̨̡̤̯͎͓̞͍͇̖̖̼̝͆̀̓̀̋͛̑̚ ̵̭̺̲̻̳͓͇̲͛̒̈̔̀̋̓̂̓̾̐͆͒̂͝͝t̸̞̩͙̖̞̱̭̟̭̮͉̲̠̊̑̀̌̋͆̄͂̑͑́͜͠h̵͉̰͆̔̊̐̈́͂̃̄̑̃̋̊͛͂͌ï̴̢̧͍̳͍̅̈́͛̑̓͗̿̒͌̿͛̒̄̚͠ṇ̵̢̾̊̄̈̏̎̍͐̅̌̔̀̕͝g̸̡̻̟̭͇̤͓͙͕̫̿̋͗͑͗̃̄̈́͝s̶̤͕̻̼̣͓̻̤̫͇̥̱̮͖͕̳̆̉̿̅̋̋͛̐̽͘͜ ̸̝̓̿́̎̓͘ỵ̵̨̧̯͍̱̫̲̘̩̘̏͋͑o̶̡̲̥͙̣̥̝̰̣͗͐̂͗̄̓̈́͜ű̵̠͐̓̋̓͐̊̃̿̚͠ ̵͓͉̕s̷̡̖̭̥̫̼̥̒̇͋́̏̀̚m̷͇͈̗͚̗͉̩̖̹͍͉͖͔̼̅̍̓̑̈̋̃͛͛̕a̵͚̣̯̫̮̬̞͚̙͎̹̋̈́̅̄̐͒̋̈́̇́̚͝ḽ̸̗̬͍̫̣̠̿̓͆l̷͖͕̣̳͉͙͇̀͋͒͋̊̉̄̅̀͝͠ ̴̡̡̛̻̟̖͍̘̃̈͐͛̌́͂͂́̑̃͌̆̋̽̚b̸͇̭̦̬̝͔̈́͂̊͌̿ȑ̷̨͉̱̬̮̩͉̘͎̩̩̙͓͙̊̈́́͊̿̾͠à̸̡̳̝̫̘̯͙͚͎̺̋͛̔̔͒̐͆͌̈́̕i̸̜͆̿̈́͑͌̏̂̑̾̈̎͝n̵̢͚̥͈̰͚̐̐̅́̌̉̃͆͛̈́̃̇ ̸̤̲̲͕̘͇̞͔́͊̃͐͑̅̿̓̾̊̈́̕̕͜p̵̡̖̖̙̝̬̪͈̙̖͓̙͚͛r̴̛͔̳̺̺̪̓͒̈́̄̈́͌̔̑̿̏̕ȍ̸̢̠̖̩̫͕͔̣̘͕̳̽̏̾̈̆̔́̈̄͘͘ͅģ̸̛͇̿̐͗̾͂̆̀̈́̌̋̋̍̑̈́͠ř̶͈͚̥̱͚̹͉͙̯̞͓̬̑̕à̷̰̲͕̯͇͓̖͉͚̒̉͜ͅm̶̨̦̰̱̪̤̻̯̙̔͆̈́͐́̚͝m̵̡͔̰͇͓̮̣̱̞̜̥̣̤̂͜e̶̛̠̝͉r̵̢̧̛̹͎̜̘͙̻̫̙̦̻̜̟͕̱͑̃̍͌̈́̃̓͊̿̕͜

Funnily enough, no errors are thrown.

Now, to define a function, you do:

void FunctionName(int arg1, int arg2) {
  return arg1+arg2;
}

Of course, a return value is not required. Return values follow the same implicit type coercion.

Surprisingly, you can convert functions into Substances:

void FunctionName(int arg1, int arg2) {
  // Code
}
(Substance.Generic)SubtanceFunction = FunctionName;

However, the function has become a substance, but the code does not. This means, comparing it to other Substances will give you the same result as the RegExp had:

void Function1(int arg1, int arg2) {
  // Code
}
void Function2(int arg1, int arg2) {
  // Code
}

(Substance.Generic)SubstanceFunction = Function1;
(Substance.Generic)SubstanceFunction2 = Function2;

SubstanceFunction = SubtanceFunction2 => How Dare you Even Try To Compare Substances! Do you even know THE tRue Po𝑤͙͎̔̈́͠𝑒̦͔̙̓̓͌𝑟̡̫͌͑͘͜ o̸͖͚̓͆͠͝f̴̨̡̢̜͙̣̗͎̗̮̤̮̞̘̻͆̄̾̾͑̅͋͋̋͠ͅ ̶̧̧̡̱̳͔̙̬͈͈͍̗̊̌̊͌͑̓̍́̃͝s̴̢̨̞̩̱͈̙̥͖͎͖̭̣̠̓̔̔͊́̊̌̈̄̽̽̇̓͌͐͜͝ͅu̷̡̡̳̻̣̟͍̥͍͉̤̦̟̫͓̖͑̀̏͒̓͛̉̓̂̇ç̸̛͖̖̘̠̲̫̜̮̭̫͎̭͚̻̯̘̌͆̆̑͌̑̃̍̈́͒͊͘̕̚̚͝h̸̢̨̡̤̯͎͓̞͍͇̖̖̼̝͆̀̓̀̋͛̑̚ ̵̭̺̲̻̳͓͇̲͛̒̈̔̀̋̓̂̓̾̐͆͒̂͝͝t̸̞̩͙̖̞̱̭̟̭̮͉̲̠̊̑̀̌̋͆̄͂̑͑́͜͠h̵͉̰͆̔̊̐̈́͂̃̄̑̃̋̊͛͂͌ï̴̢̧͍̳͍̅̈́͛̑̓͗̿̒͌̿͛̒̄̚͠ṇ̵̢̾̊̄̈̏̎̍͐̅̌̔̀̕͝g̸̡̻̟̭͇̤͓͙͕̫̿̋͗͑͗̃̄̈́͝s̶̤͕̻̼̣͓̻̤̫͇̥̱̮͖͕̳̆̉̿̅̋̋͛̐̽͘͜ ̸̝̓̿́̎̓͘ỵ̵̨̧̯͍̱̫̲̘̩̘̏͋͑o̶̡̲̥͙̣̥̝̰̣͗͐̂͗̄̓̈́͜ű̵̠͐̓̋̓͐̊̃̿̚͠ ̵͓͉̕s̷̡̖̭̥̫̼̥̒̇͋́̏̀̚m̷͇͈̗͚̗͉̩̖̹͍͉͖͔̼̅̍̓̑̈̋̃͛͛̕a̵͚̣̯̫̮̬̞͚̙͎̹̋̈́̅̄̐͒̋̈́̇́̚͝ḽ̸̗̬͍̫̣̠̿̓͆l̷͖͕̣̳͉͙͇̀͋͒͋̊̉̄̅̀͝͠ ̴̡̡̛̻̟̖͍̘̃̈͐͛̌́͂͂́̑̃͌̆̋̽̚b̸͇̭̦̬̝͔̈́͂̊͌̿ȑ̷̨͉̱̬̮̩͉̘͎̩̩̙͓͙̊̈́́͊̿̾͠à̸̡̳̝̫̘̯͙͚͎̺̋͛̔̔͒̐͆͌̈́̕i̸̜͆̿̈́͑͌̏̂̑̾̈̎͝n̵̢͚̥͈̰͚̐̐̅́̌̉̃͆͛̈́̃̇ ̸̤̲̲͕̘͇̞͔́͊̃͐͑̅̿̓̾̊̈́̕̕͜p̵̡̖̖̙̝̬̪͈̙̖͓̙͚͛r̴̛͔̳̺̺̪̓͒̈́̄̈́͌̔̑̿̏̕ȍ̸̢̠̖̩̫͕͔̣̘͕̳̽̏̾̈̆̔́̈̄͘͘ͅģ̸̛͇̿̐͗̾͂̆̀̈́̌̋̋̍̑̈́͠ř̶͈͚̥̱͚̹͉͙̯̞͓̬̑̕à̷̰̲͕̯͇͓̖͉͚̒̉͜ͅm̶̨̦̰̱̪̤̻̯̙̔͆̈́͐́̚͝m̵̡͔̰͇͓̮̣̱̞̜̥̣̤̂͜e̶̛̠̝͉r̵̢̧̛̹͎̜̘͙̻̫̙̦̻̜̟͕̱͑̃̍͌̈́̃̓͊̿̕͜

Finally, if you try to compare a normal function to a substance function, you get:

void NormalFunc(int arg1, int arg2) {
  // Code
}

(Substance.Generic)SubstanceFunc = NormalFunc;

SubstanceFunc == NormalFunc => 1

1 is the result you will get no matter what is being compared to any substance.

And that is all for this language! Rumors are that JavaScript is written on top of Cxx.

adityaru (149)

@Coder100 The first part, it already exists, JS

firefish (308)

@Coder100 That's C#... You just simply modified mscorlib.dll

DynamicSquid (2665)

@adityaru I can't tell you how much I hate JS because of that

firefish (308)

@Coder100 syntax is so similar, YOU HAVE BEEN INSPIRED wops caps

Coder100 (4274)

LOL well don't all static languages have similar syntax literally 3 of them are nearly the same

int c = 5;
int cpp = 6;
int cs = 7;

LOL
@johnstev111

NoelB33 (308)

@Coder100 This is the best part: SubstanceFunction = SubtanceFunction2 => How Dare you Even Try To Compare Substances! Do you even know THE tRue Po𝑤͙͎̔̈́͠𝑒̦͔̙̓̓͌𝑟̡̫͌͑͘͜ o̸͖͚̓͆͠͝f̴̨̡̢̜͙̣̗͎̗̮̤̮̞̘̻͆̄̾̾͑̅͋͋̋͠ͅ ̶̧̧̡̱̳͔̙̬͈͈͍̗̊̌̊͌͑̓̍́̃͝s̴̢̨̞̩̱͈̙̥͖͎͖̭̣̠̓̔̔͊́̊̌̈̄̽̽̇̓͌͐͜͝ͅu̷̡̡̳̻̣̟͍̥͍͉̤̦̟̫͓̖͑̀̏͒̓͛̉̓̂̇ç̸̛͖̖̘̠̲̫̜̮̭̫͎̭͚̻̯̘̌͆̆̑͌̑̃̍̈́͒͊͘̕̚̚͝h̸̢̨̡̤̯͎͓̞͍͇̖̖̼̝͆̀̓̀̋͛̑̚ ̵̭̺̲̻̳͓͇̲͛̒̈̔̀̋̓̂̓̾̐͆͒̂͝͝t̸̞̩͙̖̞̱̭̟̭̮͉̲̠̊̑̀̌̋͆̄͂̑͑́͜͠h̵͉̰͆̔̊̐̈́͂̃̄̑̃̋̊͛͂͌ï̴̢̧͍̳͍̅̈́͛̑̓͗̿̒͌̿͛̒̄̚͠ṇ̵̢̾̊̄̈̏̎̍͐̅̌̔̀̕͝g̸̡̻̟̭͇̤͓͙͕̫̿̋͗͑͗̃̄̈́͝s̶̤͕̻̼̣͓̻̤̫͇̥̱̮͖͕̳̆̉̿̅̋̋͛̐̽͘͜ ̸̝̓̿́̎̓͘ỵ̵̨̧̯͍̱̫̲̘̩̘̏͋͑o̶̡̲̥͙̣̥̝̰̣͗͐̂͗̄̓̈́͜ű̵̠͐̓̋̓͐̊̃̿̚͠ ̵͓͉̕s̷̡̖̭̥̫̼̥̒̇͋́̏̀̚m̷͇͈̗͚̗͉̩̖̹͍͉͖͔̼̅̍̓̑̈̋̃͛͛̕a̵͚̣̯̫̮̬̞͚̙͎̹̋̈́̅̄̐͒̋̈́̇́̚͝ḽ̸̗̬͍̫̣̠̿̓͆l̷͖͕̣̳͉͙͇̀͋͒͋̊̉̄̅̀͝͠ ̴̡̡̛̻̟̖͍̘̃̈͐͛̌́͂͂́̑̃͌̆̋̽̚b̸͇̭̦̬̝͔̈́͂̊͌̿ȑ̷̨͉̱̬̮̩͉̘͎̩̩̙͓͙̊̈́́͊̿̾͠à̸̡̳̝̫̘̯͙͚͎̺̋͛̔̔͒̐͆͌̈́̕i̸̜͆̿̈́͑͌̏̂̑̾̈̎͝n̵̢͚̥͈̰͚̐̐̅́̌̉̃͆͛̈́̃̇ ̸̤̲̲͕̘͇̞͔́͊̃͐͑̅̿̓̾̊̈́̕̕͜p̵̡̖̖̙̝̬̪͈̙̖͓̙͚͛r̴̛͔̳̺̺̪̓͒̈́̄̈́͌̔̑̿̏̕ȍ̸̢̠̖̩̫͕͔̣̘͕̳̽̏̾̈̆̔́̈̄͘͘ͅģ̸̛͇̿̐͗̾͂̆̀̈́̌̋̋̍̑̈́͠ř̶͈͚̥̱͚̹͉͙̯̞͓̬̑̕à̷̰̲͕̯͇͓̖͉͚̒̉͜ͅm̶̨̦̰̱̪̤̻̯̙̔͆̈́͐́̚͝m̵̡͔̰͇͓̮̣̱̞̜̥̣̤̂͜e̶̛̠̝͉r̵̢̧̛̹͎̜̘͙̻̫̙̦̻̜̟͕̱͑̃̍͌̈́̃̓͊̿̕͜

firefish (308)

@NoelB33 *grammar [zalgo removed]

StudentFires (340)

@Coder100 Looks like JavaScript to me, as expert JS writer.

ZDev1 (358)

@Coder100 I only replied on this