Discussion New Language - Discussion

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
It'd be much easier than Python, which I can't find any good parsing tools for.
At least with C/C++, there is a massive community, and I can find a lot of resources.
 

GetTriggerUnit-

DogEntrepreneur
Reaction score
129
Why write the definition first?? Shouldn't you be writing a simple compiler that compiles a simple script instead to start with??

Like:

Code:
func CallMe (int a, unit b) [bool]

endfunc

converts as

function CallMe takes integer a, unit b returns boolean

endfunction

This [bool] is odd.

Real programming languages uses

bool CallMe (int a, unit b) {}
 

ertaboy356b

Old School Gamer
Reaction score
86
Just make the coding shorter... I hate writing "function blahblah takes nothing returns nothing" over and over again..
 
Reaction score
333
I don't know where this "scripting syntax" stuff has come from but it is wrong. This is a scripting language, and scripting languages are programming languages by definition.
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
"A scripting language, script language or extension language is a programming language that allows control of one or more software applications. "

Also, here's some progress:
JASS:
Namespaces are vJASS libraries, and have essentially the same features.
Example:

namespace HelloWorld
	globals
		private constant string msg = "Hello World!" // Why global? I have no idea...
	endglobals
	
	function Init takes nothing returns nothing // Init is automatically called. No need to declare the initializer manually.
		call BJDebugMsg(msg)
	endfunction
endnamespace

If we want to require other namespaces...

namespace Hello World
	globals
		private constant string msg = "Hello World!"
	endglobals
	
       function helloworld takes nothing returns nothing 
		call BJDebugMsg(msg)
	endfunction

endnamespace

namespace HelloWorld2 requires HelloWorld
	
	function Init takes nothing returns nothing
		call helloworld() // this is completely valid, since this namespace requires the other one. 
	endfunction
endnamespace


Opinions?
 

Narks

Vastly intelligent whale-like being from the stars
Reaction score
90
waaaaaaaaaaaaaaaaaaaaaat?

namespace Hello World = HelloWorld


and what was wrong with the word "library" - or do you have something else planned for that?
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
> or do you have something else planned for that?

Nope. I just don't like it. Namespace makes more sense anyway.

> namespace Hello World = HelloWorld

My bad.
 

Jesus4Lyf

Good Idea™
Reaction score
397
JASS:
	globals
		private constant string msg = "Hello World!" // Why global? I have no idea...
	endglobals

...

Opinions?
Care to shed the [LJASS]globals[/LJASS] keyword?
-->
JASS:
		private constant string msg = "Hello World!" // Why global? I have no idea...


[LJASS]endnamespace[/LJASS] is a horrible thing to type. I'd recommend you make the word [LJASS]library[/LJASS] compile also.
Familiarity means a lot to people. Often more than what's ideal, in one's own opinion.
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
I'll try to make it parse without the globals keyword.

> I'd recommend you make the word library compile also.

D:

You know I'll be designing this so it works with JassHelper too, right?
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
> or do you have something else planned for that?

Nope. I just don't like it. Namespace makes more sense anyway.

I also preferred library, and namespace is longer. They both make sense in this situation, as it's a library of code, or a group of code under specific namespace.

In the context you're using things, library seems to make a bit more sense. Having namespace "require" other namespace doesn't make much sense.

Furthermore, why even have a globals block? You should be able to simply declare them, and have the compiler know that it is global by the fact that it is outside a class/struct and outside a function.

Finally, hard tabs are evil. Why are you using them? :p

JASS:
library HelloWorld {

    private constant string msg = "Hello World!"

    public void display() {
        BJDebugMsg(msg)
    }
	
    Initializer { //The initializer is automatically called.  They are automatically private, and do not take/return any arguments.
        BJDebugMsg(msg)
    }

}

//If we want to use other libraries/packages/namespaces

library useHelloWorld

    include HelloWorld

    Initializer {
        display()
    }
}
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
> Furthermore, why even have a globals block?

Honestly? Simplicity in the code.
This feature would be great, but honestly, I'm no master programmer.
Though I'm confident I can make the language and the preprocessor, I know for a fact I won't be able to create all the features everyone wants right away.

In time, yes, I will add that feature, and any other good feature people want, but only after I've found out how to efficiently do it.

> I also preferred library.

I find namespace easier to type, but if enough people request it, I will make library work.

> Finally, hard tabs are evil. Why are you using them?

Explain?

> [ljass]include HelloWorld[/ljass]

I'm already planning on an include keyword.
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
My opinion
JASS:
space ha
endspace
//No need to type for initialiser, auto search for onInit as initializer.
//all functions/variables are private as default.

JASS:
func Hello (string s) -> nothing
BJDebugMsg(s)
endfunc
//Function example.

JASS:
set x = y
//Setting variables.

JASS:
space ee
    real x = 60.
//No need to use &quot;globals&quot; at here. <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin    :D" loading="lazy" data-shortname=":D" />
//It will be private as mentioned above. 
endspace
 

Narks

Vastly intelligent whale-like being from the stars
Reaction score
90
and what if you want to nest stuff? it might get a little bit confusing if it's just "end".
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top