/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
>>60631568
>simple and modern compiled language to extend C
Would it be compatible with C libraries?
>>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
>>60632505
>overloading = overriding
>>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.
>>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.