[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]

/g/ project: specifications and compiler of a modern, simple

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: 23
Thread images: 6

File: gcc.png (175KB, 423x501px) Image search: [Google]
gcc.png
175KB, 423x501px
/g/ project: specifications and compiler of a modern, simple and not bloated new C derived language.

official mascot: blepe

This thread is for discussing and proposing language specifications.

Proposed features:
>tuples
>polymorfic data types
>operator overloading
>decent string implementation (e.g. https://github.com/antirez/sds)

Please propose other features or discuss the ones above.
Also, we need a name. I was thinking something like newC, with compiler called ncc.
The actual goal is to write a new language specifications.
The goal of newC language would be that of providing a simple and modern compiled language to extend C in order to use it in some tasks that are painful to work in C, without bringing in OOP paradigm and making it extremely intuitive for C programmers to learn it.
>>
just mix the best parts of D and C++ desu
>>
>>60631568
dumb blepeposter
>>
>>60631568
Revive Cyclone
>>
Lets not make a new C based language but instead make a new compiler+Language with assembly.
>>
>>60631568
>without bringing in OOP paradigm
kys
>>
File: 1495187431708.gif (5KB, 200x175px) Image search: [Google]
1495187431708.gif
5KB, 200x175px
>>60631568
>simple and modern compiled language to extend C
Would it be compatible with C libraries?
>>
File: 1494708116053.png (338KB, 558x493px) Image search: [Google]
1494708116053.png
338KB, 558x493px
>>60632085
>OOP
>not shit
>>
>>60632129

OOP is brilliant bro, it's basically the best of procedural and functional programming brought together.
>>
>>60632007
Which are, in your opinion, the best parts of D and C++?
>>60632085
Everything that can be done in OOP can be done with struct.
I was thinking something like this:
struct x {
int foo(int, char);
}

x.foo(a,b);
//which is equivalent to
//foo(&x, a,b);


It is just a clean way to organise function and make cleaner code.
>>60632093
No, libraries need to be written.
But with polymorfic data types, we can make standards libraries that include common data structures independent of the data types.
>>
>>60632222

Here's my model for how member functions would work in my ideal language.
Rather than the three way distinction of C++'s static, non-static non-virtual and non-static virtual you have a simple two way distinction. Static/nonstatic. Or if you prefer, virtual/nonvirtual.

struct Foo
{
void doThing(Foo& this) { } // a static function
};

Foo myFoo;
myFoo.doThing(); // resolves to Foo::doThing(myFoo);


UFCS sugar makes nonstatic nonvirtuals redundant and this particular style avoids polluting the global namespace with free functions. So I'd like to get rid of them to make things cleaner.
>>
>>60631568
literally "i'll make the logo and be the ideas guy". lurk more, idiot
>>
>>60631568
>having symbolic modules instead header/implementation, because that's the only non-retarded way to include files
>have runtime execution, AST API and special annotations for metaprogramming like in JAI

also >>60632085 or at least add another sane way for runtime polymorphic dispatch
Pro-tip: Library based anything like gObject, moose or clos isn't.
>>
fuck off to >>>/bant/
>>
>operator overloading aka ad hoc polymorphism
fuck off m8
atleast make it type classes instead
>>
File: retardation.jpg (12KB, 473x356px) Image search: [Google]
retardation.jpg
12KB, 473x356px
>>60632505

>overloading = overriding
>>
File: 1493936129463.jpg (97KB, 1024x768px) Image search: [Google]
1493936129463.jpg
97KB, 1024x768px
>>60632514
It overrides the regular function of an operator
>>
>>60633169

It's not overriding if it's not a runtime resolution. Overloading is a compiletime convenience feature.
>>
>>60633309
>It's not overriding if it's not a runtime resolution
Hence why "Java performance" is an oxymoron.
>>
>>60633355

What does Java have to do with anything?
You're sounding schizophrenic, anon.
>>
File: 1494200269193.jpg (6KB, 202x159px) Image search: [Google]
1494200269193.jpg
6KB, 202x159px
>>60633375
Maybe because different people are answering to you, retard
>>
>>60633375
Override is from Java. C++ uses overloading instead.
>>
>>60633438

Overriding is definitely a part of C++ senpai, it's the exact reason why virtual functions exist.
Thread posts: 23
Thread images: 6


[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.