[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Dream language mockup

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 18
Thread images: 1

File: strout.jpg (43KB, 1280x720px) Image search: [Google]
strout.jpg
43KB, 1280x720px
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
Thread posts: 18
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.