Other Software > Developer's Corner
Brainstorm for a cross-platform programming language
KodeZwerg:
Hi, RAD Studio (Delphi) is a language wich can compile for all major platforms, but only accepts C++ or Pascal format.
Visual Code might also do what you wrote.
Cheers
Deozaan:
So, don't take my last post the wrong way. I don't mean to suggest that you shouldn't proceed with the idea. The idea sounds interesting and probably useful. It also sounds like a lot of work.
Either way, I'm not an expert enough programmer to be of any use on this particular project, so I'll likely not say much else in this thread. That said, I'll likely be watching with interest. :Thmbsup:
publicdomain:
Hello, good day & many thanks to all of you -fine posters- for the input!
This brainstorming thread has a worthy purpose as we're going to have such a "pdCode" project made a reality!
Chances are this very year 2020 2021 we can reach v0.1.0 with initial/useful functionality.
So, don't take my last post the wrong way.
-Deozaan (January 22, 2020, 04:03 AM)
--- End quote ---
Rest assured it is only taken lightheartedly!
We are simply aiming at becoming useful to those who support our ways. The internet world is large enough for everybody to express freely :)
If nothing more, it can be a way for our public domain releases to remain current over time by reaching the "valid platforms of the day" via truly-native executables coming from the same code base.
...Even one (1) happy user beyond that and it's a win!
Functions and objects would be modeled largely after Microsoft's dotnet framework technology.
--- Code: C# ---pdCode version: 0.1.0 type: console targets: net, java, server, web, android Program name: "First test" description: "Just checking the language's text mode." Main() // Set message messageText = "Hello world in pdCode!" // Print one line Console.WriteLine(messageText) // End program return 0
It would be dynamically typed, case-insensitive, adhering to the off-side rule (indent-based) and leaning to the verbose side when in doubt --yet aiming at being succinct.
Targets would be platform-based. Any intermediary programming language output working just as a means to generate the target platform's native executable format.
User would simply issue the command:
--- ---pdcode HelloWorld.pdc
To compile the program simultaneously into:
HelloWorld.exe ← net
HelloWorld.java ← java
HelloWorld.apk ← android
HelloWorld.js ← node
HelloWorld.html ← web page with a javascript console interface
For GUI mode, it would mostly work with traditional widgets:
--- Code: C# ---pdCode version: 0.1.0 type: gui targets: net, gtk, java, android, web Program name: "First GUI app" description: "Minimal user interface test plus an event handler." version: 0.1.0 copyright: "John Cody Doe" license: CC0-1.0 GUI mainForm size: 277, 95 text: "GUI test" startPosition: FormStartPosition.CenterScreen messageLabel size: 253, 23 location: 12, 19 text: "You must close me three (3) times!" font: "Arial", 11.25F, FontStyle.Bold closeButton size: 101, 33 location: 88, 53 text: "&Close" font: "Arial", 11.25F, FontStyle.Bold foreColor: Color.Red // Variable for holding triesclosingCount = 0 CloseButton_Click() // Close by button Close() MainForm_Closing(e) // Rise closing count closingCount++ if closingCount < 3 // Advise user MessageBox.Show($"You have tried only {closingCount} times!", "Please try again") // Prevent closing e.Cancel = true
Perhaps the GUI types being inferred from object names can be deemed a bit odd, yet it adds to the overall readability.
Also, event names are signaled by coming after an underscore (_) in the handler function.
The idea is for pdCode to find the sweet spot or via media between intent-based and traditional language.
It can also become an intermediary step in some specific scenarios (more in a new post).
Navigation
[0] Message Index
[*] Previous page
Go to full version