Your dream programming language
I realize this might be hard to get people to do, but I'll give it a go.
If you got to put your own programming language, what would it look like?
To save a few lines, don't write down the entire syntax (doubt anyone would do that anyway). Just say, this functionality from that language and this from that. And if you're lucky, maybe there already is such a language you just don't know about. :o :D
I guess I'll start. Kinda hard because I haven't really thought of this before.
The basic syntax and speed of C++ The amount of built-in functions of PHP The compatibility of Java
I realize this is just a very shallow description, but feel free to go more in-depth. :)
Mine would look kinda like this
%include <iostream>
%include "my_header_file.h"
%define PI 3.1415926535897
$string(string) = "hello world";
$number(int) = 5;
~This is a comment for one line
/~ This is a multi line comment
and though type casting vars isn't required
I included it for this example ~/
disp<<PI;
int function add($a,$b){
return a+b;
~notice after a variable is defined there is no need to use the $ anymore
}
long function add($a,$b){
return a+b;
~overloading is aloud
}
if(defined(PI)){
disp<<"go pi!!";
}
class box{
function box(){
disp<<"I have a box";
}
function %box(){
disp<<"aww no more box!";
}
}
Defiantly, could use improvements and there are things I would change but this is kinda just a estimate. It is somewhat of PHP with a C++ twist(mainly to be used for computer programmers transferring out of PHP I suppose)
EDIT: However, I do like moshbat's functions I'm sure I could fit them in :P
-include "Windows.Functions"
-define title "Website Shell Include Program"
// My Dream Programming Language
start.main[WEBSITE,WEBARGUMENTS,SHELL]
{
set string argument.1 = WEBSITE;
set string argument.2 = WEBARGUMENTS;
set string argument.3 = SHELL;
use argument.1(if argument.1 defined) else exit;
use argument.2(if argument.2 defined) else exit;
use argument.3(if argument.3 defined) else exit;
VK_F1 = help.chm
VK_F2 = open (argument.1,argument.2,argument.3)
}
This language takes a syntax similar to C and C++, makes it as easy to learn as Python, Ruby, and Perl. It would be as fast as ASM and would have the same portability as Java, with the capabilities of outputting HTML to use as a web application.
I have actually thought of this before… I would create an EVEN MORE basic BASIC. It would be called ADD. Almost all functions would have 3 letter titles that way once you know them all you can type it SUPER quick. Ie.
icl /pr0n.add; "This is a comment (rarely used) and icl is an 'include'"
icl /hide.add;
use fnc grb "Use function 'grab' which returns variable $tits"
{
if $tits=8 [px] thn ($pnis=$pnis+5) "if loop"
els ($pnis=0); "semicolon for phrase breaks"
ech Growth amount: $pnis; "ech is like echo"
END "heres where BASIC comes in lol"
I'd say a crude version of php and basic… Maybe a lil C?
What do you guys think?
fashizzlepop wrote: I have actually thought of this before… I would create an EVEN MORE basic BASIC. It would be called ADD. Almost all functions would have 3 letter titles that way once you know them all you can type it SUPER quick. Ie.
icl /pr0n.add; "This is a comment (rarely used) and icl is an 'include'"
icl /hide.add;
use fnc grb "Use function 'grab' which returns variable $tits"
{
if $tits=8 [px] thn ($pnis=$pnis+5) "if loop"
els ($pnis=0); "semicolon for phrase breaks"
ech Growth amount: $pnis; "ech is like echo"
END "heres where BASIC comes in lol"
I'd say a crude version of php and basic… Maybe a lil C?
What do you guys think?
Attention Deficit Disorder seems like a language you lose focus on constantly :P
c4p_sl0ck wrote: [quote]system_meltdown wrote: PHP 6, when it's finally released.
A good choice. :) I guess it's a good thing as well that it's not released too soon, when it's not finished.[/quote]
Yeah indeed.
5.2.9 was released on 26th of Feb, so I upgraded to that the other week. Still psyched about PHP 6 though :D
Since you're discussing PHP6; does anyone more than me wait for the new C++ standard? :)
http://en.wikipedia.org/wiki/C++0x http://www.open-std.org/jtc1/sc22/wg21/docs/papers/
Uber0n wrote: Since you're discussing PHP6; does anyone more than me wait for the new C++ standard? :)
http://en.wikipedia.org/wiki/C++0x http://www.open-std.org/jtc1/sc22/wg21/docs/papers/
I hadn't heard about it, but I am DEFINITELY up for seeing it.
-Bl4ckC4t
I'm with System and looking forward to PHP 6. Its great to see the support of the <% tag is to go as that only belongs in ASP and I feel it should never of been in PHP.
Also great to that safe mode is to go as hosts always seem to have this setting to screw us over.
Not sure if anyone knows or not but is there going to be some changes to the OO support of PHP in this version?
As I think the OO feature still needs some tweeking.