Back when I was in school, I was bored in class so I started drafting something I called my dream language. I liked features of C++, but hated the amount you had to type for it. I love the style, speed, and formatting of Java. I am also a Lua fanboy who wants to store functions inside their own variables.
So for C++, I liked how I could assign overloads for operators. Object + Object2.
I also like how you could use a struct to dynamically allocate bytes for an object.
From python, comes efficient imports that don’t have a lot of unused text. It’s a nightmare for me manually importing java packages from libraries, especially when using ctrl-space.
C++ has pointers. Pointers are awesome, and so is dynamic memory management - something Java should have. I have had times using XMI file format where I want to take Image object’s array of pixel bytes and free it.
I don’t like how types force that you can’t subtract doubles from ints. The trailing bytes should be lost, or even some overhead would be nice for small-very seldom called-operations that would allow (byte)(0b1 - 1d) which is 0.
C# has get and sets to their fields. I love it. Especially when combined with lambda.
C++ has them mad destructors which are great.
As far as drafting out including other files, inheritance, and strings go I haven’t sat down to think about that. I just wanted to share this cool thing I came up with. To be honest, header files could be reinvented to include everything above struct Example {}. I don’t even have access modifiers.
As far as errors go, I don’t like error handling. There has to be a much better way. This goes with smart pointers and C++. Smart pointers manage the memory in a way where data isn’t leaked. In cases of sandwiching deallocations of memory with allocations, it makes sense to use them because when an error is thrown or a return reaches, its dead code. In the case of returns, you could just flag memory to be deleted on stack on function exit and don’t be a retard and return that memory being deallocated.
http://pastebin.java-gaming.org/47d3366694f19
What does your dream language look like? What stuff are you looking for to be different?