MEGA programming lang

hi anybody ...

my friend (BlackBat) and I (mr.CHE) are designing a new programming language
which named MEGA with c++

it would be ready to use until two mounth later .

mr.CHE
closed account (zb0S216C)
That's great, but it's not a question, so this should be moved into the lounge.

Edit: I've been working on my own language, too :)

Wazzak
Last edited on
I have a question :
where we can get GNU license ?!
closed account (zb0S216C)
See here: http://www.gnu.org/licenses/gpl-howto.html

Wazzak
thank you...!!!
Your language sounds interesting, just to whet our appetites could you tell us a bit more, maybe even show a few example programs that will show what the syntax will be like ?
Mr.Framework, can you tell us about your programming language more?!

its Syntax is between Perl and python. This language has Multi Pass interpreter so it is easier than languages like C++

but it isn't complete yet... so we may improve it! If you have any idea, you are welcome to put it up. Please tell us what Syntax do you Like!!!

an Example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#it is a C0mment
//it is a C0mment too
(*it is a super 
   C0mment*)

$import iostream

class myProg
   public func main()
      a=5;
      b=2;
      if(a==b)
         print("a == b");
      else(a!=b)
         print("a!=b");
      else 
         print("Never Execute!!!");
      return 0;
Last edited on
closed account (zb0S216C)
BlackBat wrote:
"Mr.Framework, can you tell us about your programming language more?!"

Sure. Here's a quick overview:

16/32/64-bit Assembly Support. The assembly instructions are integrated, and support procedures. Unlike C/C++, in-line assembly doesn't appear in a function call, nor does it appear as a string. Here's an example:

x86.mov ax, $0x01; comment.

The x86 prefix means the compiler will use 32-bit registers. The $ indicates the beginning of a constant (hexadecimal only). Constants that begin with 0x are considered addresses.

Modules. Modules are similar to C++'s name-spaces. Modules provide a new scope in which declarations can be placed. Modules work like C++'s name-spaces, and take this form:

1
2
3
4
5
6
7
8
module my_module
{
    ; Functions:
    void function();
}

; Accessing a module:
my_module.function(); call "function" from within "module."


However, unlike C++'s name-spaces, modules work in conjunction with header files. When you include a header into another file, you can specify what the pre-processor imports from the header file. For example:

1
2
3
$import module: header.cogh
$import module.nested_module: header.cogh
$import module.function: header.cogh

The first line can be read as: import "module" from "header.cogh." The second line can be also read as: import "nested_module" from within "module" in "header.cogh." Finally, the third line can be read as: import "function", and all of its overloads, from within "header.cogh." The advantage to this is that you only import what you want, and not import heaps of code that you don't want.

Threading. With today's demands for performance, threading is an essential feature of any language.
Threads are also integrated into the language, and are placed within the kernel module. The design for this is not yet implemented.

Classes. Classes are fully customisable. You can apply different attributes that change the way the compiler handles the class. Here's a simple class declaration:

1
2
3
4
5
6
class my_class(align(4), explicit) 
{
    ; Class members
    constructor(...);
    destructor(...);
}

The code after my_class are the attributes. From left to right, the first attribute means this class must be aligned on a 4-byte boundary. The second attribute specifies that the compiler must not do anything implicit. In other words, the programmer must be explicit as to what he/she wants to be defined within the class. For example, if a programmer wants a constructor and/or destructor, they must specify one.

I haven't decided whether or not the language supports OOP.

User-defined types. This feature is mainly for efficiency purposes. A programmer can define a new type, such as an integral type, character type, or floating-point type, whilst being able to define the amount of bytes (1, 2, 4, 8, 16, ...) the type should allocate. Of course, the amount of bytes depends on the host's architecture. Here's the syntax:

typedef my_type, s_int:2; Type-definition.

This can be read as: define "my_type" as an signed integral type, which allocates 2 bytes.

That's a few features, but I'm far from done :)

Wazzak
Last edited on
Topic archived. No new replies allowed.