I'm creating a new programming language to manipulate data, can you tell me if it could be useful ?

mrskatmus

New member
Hello everybody, I'm an amateur at programming and I put to myself the challenge of creating a useful programming language. I'm not here to ask how to create it, but rather, if it could be useful in some cases.

It's purpose is to manipulate data, and for that I have created a new symbol "|>". Its is used like that :

Code:
var data = [1, 2, 3, 4, 5]

Code:
data:

Code:
|> multiply(n, 10)

Code:
|> double(n)

Now data is [20, 40, 60, 80, 100]

You call the variable you want to manipulate and with each "|>", you can call an action to do on the variable, here I call multiply and double. "n" means that I iterate through each value to do something with it.

Code:
var data = [1, 2, 3, 4, 5]

Code:
data:

Code:
|> multiply(n, 10) -> other_data

Code:
|> double(n)

Now data is [2, 4, 6, 8, 10] and there is a new variable other_data that is [10, 20, 30, 40, 50]

When you call a function that return something, you can either use the "->" symbol to put the result in a new variable, or don't so the value of the variable is changed to the result of the function.

Code:
var data = [1, 2, 3, 4, 5]

Code:
data:

Code:
|> multiply(n, 10)

Code:
|> if len(data) > 10:

Code:
continue

Code:
else:

Code:
double(n)

You can call function only if a condition is met.

Code:
routine = [mutliply(n, 10), double(n)]

Code:
data = [1, 2, 3, 4,5]

Code:
data:

Code:
|> routine

You can create a routine, a set of function that you call all at once. Here, I don't know how to do if the user wants a routine with "if", "else" and "->" in it, so if you have any suggestion, please tell me.

Code:
data = [1, 2, 3, 4, 5]

Code:
data:

Code:
|> filter(n, |n%2==0|)

Now data is [2, 4]

"||" is a new type of data that I call a "formula". Here, I use it to keep only the even numbers of the list. It can be stored in a variable like any other type of data.

Here is all of the new things of my programming language. My question is : Is this useful ? Can somebody really do something with it ?

Also, if you have any suggestions, please tell me.

Thanks in advance everyone !!!
 

Similar threads

Back
Top