I have an idea for a universal programming language

Joined
Jun 15, 2022
Messages
101
Reaction score
0
So long story short, the way it works is it only has types that are critical to the functioning of the programming language itself, so null, string, integer, float, array, object, and boolean, everything you would need (and nothing more) to run a "computer program".

Anyways now I need to get the word out and whatnot. Any ideas?
 
Joined
Jun 15, 2022
Messages
101
Reaction score
0
I have another post wherein I was trying to figure this out on the level of a database, to get the ball rolling. What came up was JSON, in fact a perfect fit. You see what I'm getting at. :)
 
Joined
Mar 11, 2022
Messages
227
Reaction score
32
Ah, now i understand what you've meant by your other post.
Unfortunately i have to take my needle and poke some holes in your bubbles of dreams if you want to come up with a completely NEW language from the scratch. There is so many catches, that i even don't know where to start from.

But there is a chance if you try to create an languageextansion "kind of" as Kotlin is. Kotlin is based on JAVA.

Well. What should it become? NEW LANGUAGE, or Extension?
 
Joined
Jun 15, 2022
Messages
101
Reaction score
0
I am, more simply, trying to prove my point. If people understand json, why not a universal programming language?
 
Joined
Mar 28, 2022
Messages
82
Reaction score
11
why not a universal programming language?
Another way to look at this question is to ask "why are there many?"

My answer is specialization enhances the ability to think about solutions in a given field. For example, Structured Query Language (SQL) gives the tools to create and manipulate complicated data records and their relationships. Whereas Mathematica provides a language geared toward solving math problems.
 
Joined
Mar 11, 2022
Messages
227
Reaction score
32
@Cinder
Nope, that is two completely different things. JSON has nothing to do with types at all. It's just a string. PERIOD.

Types and casts are nothing else than handlers. If type is that, than value is expected to be this. And so on and so on.

Example:

200 is a Number. If you just work with that, without any other categorization (INTEGER, LONG, DOUBLE, and so on) you wont be able to do exact calculations PLUS you may bloat your programm in ressources and performance. (BITS, BYTES) Many people have tried that before. NOT WORKING.

Every compiled programm at the end is runned as binary 0 and 1 Numbers.

Coding languages must be strict. So one size fit's all types can't be used. And i guess, that's what you try to do. One type of array, on type of String, one type of numbers and so on and so on.

Of course there is a bunch of languages, where types don't really matter. But i would not call them programming languages, but script languages. Javascript is a example. PHP too, but PHP isn't really a script language nor a programming language. It's just a "maybe parser language as right word????". I mean you may declare an array in both languages like this: myarray=[]: That's no programming language, that's a joke.


C have a loose type handling, still strict, C++ went mercyless strict again (with exeptions). Don't know about Python, but XCode (another form of C++) is completely different. Strict but sloppy at the same time. So, there is allready something there, that matches your idea. But it is based on a strict language. It's just a different method of compiling. Or rephrased: The compiler itself take care to get your syntax back to how it's needed.


So there is only 2 ways for you to achive your goal.

Number one: Write your own compiler (should be based on a known and used language and should return a runable build)
Number two: Don't think that huge and limit your effort to writing libraries for your prefered language, that handles all the types for you.
 
Last edited:
Joined
Jun 15, 2022
Messages
101
Reaction score
0
Ok, yea this all makes sense, my point is anyone who knows anything about databasing knows that all we need to run a "computer program" are the aforementioned types.

Furthermore I've dreamt up a (working) solution to this problem: It's a class that does everything you need to maintain persistent data, the idea being that there is either a static "computer program" (no variables) or a dynamic one, where we MIGHT need persistent (and variable) data.

And just to be clear, I'm not being condescending or anything, just trying to communicate my idea :)
 
Last edited:
Joined
Mar 11, 2022
Messages
227
Reaction score
32
Ok, yea this all makes sense, my point is anyone who knows anything about databasing knows that all we need to run a "computer program" are the aforementioned types.
Wrong. But anyway, i got your point.

Yes, of course (as i mentioned above) you can write a library, class or stack on code to any existing coding language to handle this exact problems.

But it also would bloat everything up. Because such a class or stack on code would be huge by itself to handle different types and casts.

But if i really think about it, maybe your very first idea about json isn't that bad at all. As a kind of MVC maybe. So your stack on could be just a bunch of functions to handle a string of values and return the exact types'n'vals.

What language would be your choice, or didn't you thought about it yet?
 
Joined
Jun 15, 2022
Messages
101
Reaction score
0
Technically speaking the types can go, all that matters is that the thing works.

Furthermore I've dreamt up a (working) solution to this problem: It's a class that does everything you need to maintain persistent data, the idea being that there is either a static "computer program" (no variables) or a dynamic one, where we MIGHT need persistent (and variable) data

Ever hear of anything like this?

And I'm currently working in php, lol, but of course this could change.
 
Last edited:
Joined
Jun 15, 2022
Messages
101
Reaction score
0
Another way to look at this question is to ask "why are there many?"

My answer is specialization enhances the ability to think about solutions in a given field. For example, Structured Query Language (SQL) gives the tools to create and manipulate complicated data records and their relationships. Whereas Mathematica provides a language geared toward solving math problems.

Think about it, a universal programming language would generalize everything about programming (and everything else!)

PHP? Are we wasting time here or is this thread serious?

I AM serious, I know like 7 languages, I am not faint of heart
 
Joined
Mar 11, 2022
Messages
227
Reaction score
32
Well so go for one of the other six languages. PHP don't need special type handling. PHP even do not work with objects. CLASSES (and especially stdClass) is no Object, but is misused for many many times.

The only differents about types in PHP is the array type.
(String), (Int), (Number) is only rarely used. The only thing in PHP where any kind of typehandling would make sence in my mind is namespace handling. Because that's horrible in PHP.
 
Joined
Jun 15, 2022
Messages
101
Reaction score
0
Ok check THIS out:

Can you make a "computer program" with the types I mentioned?

If so, can you make a "computer program" after you remove one of them?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top