I am not sure if its C or C++, but I find it funny that the compilers are made in its own language. But yeah. Assembly.
I guess I’d start with Java but somehow shoehorn in some new features.
As in Python, nice syntax for:
- generators, yield
- list comprehensions
- multiple return values
Other features:
- const (for method parameters)
- Duck typing for interfaces, checked at compile-time like Go
Actually python has some great stuff, but I don’t really like dynamic typing, mostly because it masks information the IDE could use for code-analysis and -completion.
I’d rather would like to have a static typing with advanced type inference…
I quite like designing languages and writing compilers … usually for languages that no-one will ever use but hey ho. A few years ago I wanted to come up with a language for youngsters to write computer games. Languages like java tend to be way too complex unless you’re insanely keen. Most people start by getting a program to say hello world and in my language it’s just:
“Hello World”
“or Hello World” at 200, 200 color blue
“or even Hello World” at 200,200 color green move up 100 then reverse
You could also have simple boxes or images on screen:
box at 300, 300
image “brick.png”
image “brick.png” tile 20 by 2 at 0,30
You could also define things ie:
define wall image “brick.png” tile 20 by 2
and then use it like this:
wall at 0,30
Obviously it’s not much of a game without a player you can move:
man at 300,300
box at 280,200 action stand
exit at 400, 200
There was more stuff like loops and actions but that roughly sums up the game. It wasn’t perfect but it was quite easy to produce a game with not many lines of “code”. None of these games would win prizes but with a little ingenuity they could be fun. A complete “game” might look like this:
background = stars
define mybox box 60 by 60 action stand
loop x = 30 to 500 step 90
mybox at x, 250 - ( random%50 )
color random
move up random%100 then reverse
end
man at 50 370
exit at 600 200
Machine,
Pls make website,
all responsive like,
w/ BIG pictures ooo,
use my fav fonts,
also fancy menus with wooosh on,
load fast pls,
Thanks,
Human
PS no bugs :)
Okay this is a joke but hey a little laughter at the time is okay, right?
Could I take a look at your work?
My dream language is Java :persecutioncomplex:
You sound like princec
You say that like there’s something wrong with sounding like princec
[quote]You say that like there’s something wrong with sounding like princec
[/quote]
I believe it’s not
I agree with most Java improvements mentioned so far.
I also think about mixed languages. It’s inspired by Arity Prolog. (though, I’m not sure they really help much)
E.g. Embedded C in Prolog (or Java to Prolog. It’s quite near to Scala(?))
... various Prolog declarations ...
:- c.
extern unsigned long ulNRlips;
extern char achNRtime[10];
#prolog
nrevbch(Length, Iters) :-
do_nrev(Length, Iters, Lips, Time),
float_text(Time, TimeAtom, fixed(2)),
{
Lips:long,
ulNRlips = Lips;
'MakeCString'(achNRtime, sizeof(achNRtime), &TimeAtom)
}.
... additional Prolog code ...
There is absolutely nothing wrong with princec, nor did I even mention something being wrong with it to cause you to think that. Princec loves Java
You don’t want to be like me, I’m a curmudgeonly old bastard, and I hate computers.
Cas