Post fake ideas for a language you'd want. This is my ideal C++ dialect#include stdio.h;
#include out.h;
using namespace??
class Object
{
public:
Object(int x, int y);
~Object();
void set'X'(int x)
int get'X'();
//built in accessors
void set'Y'(int y){Y=y*y+1;}
int get'Y'(){return Y;}
private:
int X, Y;
}
void main()
{
Object cup(5,2);
Dynmc Object bowl(10,22); //Create new
cup.setX(12);
bowl->setX(9);
out("bowl " + bowl->getX() + " on table");
for(int i=0->10)
printf("loop");
Delete bowl();
}
>>59836834
That is fucking disgusting.
>>59836848
best twitter app for android? really sorry for asking. I need quick answers.
>>59836848
Why so? the set'X' is a bit much
>>59836834
You just took C++ and made it even worse and more inconsistent
>>59837469
I need specifics, this is intended to be easier to read.
My dialect of C++:Object *obj = new Object();
obj.blah(); // works. -> operator is redundant and stupid
Std.foo(); // Std is a namespace. :: operator is for bakas
#include <stdio.h>
struct test{
int d;
/*void (*foreach)(struct test*, int);*/
void this (*foreach)(int); /* this */
this void (*foreach)(int); /* or this */
void (*foreach)(int):this; /* or this one */
};
/*void funt(struct test *te, int n){
int i;
for(i=0;i<te->d;i++){
printf("%d %d\n",n+i, i);
}
}*/
this(struct test*) void funt(int n){/* this */
int i;
for(i=0;i<this->d;i++){
printf("%d %d\n",n+i, i);
}
}
void funt(int n):struct test*{/* or this */
int i;
for(i=0;i<this->d;i++){
printf("%d %d\n",n+i, i);
}
}
int main(void){
struct test st;
st.d = 8;
st.foreach = funt;
st.foreach(10); /* to do this */
/*st.foreach(&st, 10); and not this */
return 0;
}
>>59838205
Go back to Java, pajeet.
>>59836834
My work's codebase is in c++. I'd like forward declaration requirements removed, includes removed (code shouldn't have to know about the structure of directories or filenames to compile).
Implementing a class shouldn't just be a bunch of methods with ClassName::MethodName() lying around in the cpp, but rather a class ClassName { MethodName() {}; MethodName2(); }
Also implementing your own version of smart pointers or using hungarian notation throws a compile time error.
>>59839696
So basically you just want to get rid of header files.
>>59836834
The constructor and destructor are public. Why are they not indented like the other public entities?
>>59836867
Twitter.
Named constructors, named constructors everywhere.
>>59838205
I wish :: was never introduced in C++.
Basically strongly typed Lua with a proper module system, functional facilities, big ass standard library like Python, and package manager similar to Cargo.
Do good
For the value is true when placed yes
i=4,6
Fizz
For value no
Buzz
>>59836834
C# but compiles into machine code instead of running in a VM