Thread: Gs3
View Single Post
  #60  
Old 04-19-2013, 03:19 PM
Jiroxys7 Jiroxys7 is offline
Hazard to Graal
Jiroxys7's Avatar
Join Date: Apr 2009
Posts: 343
Jiroxys7 will become famous soon enough
Quote:
Originally Posted by fowlplay4 View Post
Personally prefer the Java-style of declaring variables/types than your current GS3 way, no need to carry over how we currently use temp to GS3 as it just adds unnecessary code.

type variable;

Being able to create global functions would be cool too, I imagine GS3 would be more flexible in some way that we can modify built-in functions?

I.e.

Graal Script Code:
class Options extends TGraalVar 
  
int age;
  
string gender;
  
string city;
}

function 
void saveOptions() { 
  
Options options = new Options(); 
  
options.age 24
  
options.gender "female"
  
options.city "Dallas"
  
options.savevars("options.txt"0); 
}

function 
number addNumbers(number anumber b) {
  return 
b;

This is shockingly similar to how C# works, too. I would not mind this one bit.

Also, is there any chance we would be able to have support for collapsing functions? For example, if you were to collapse FP4's example, in Visual Studio it would look something like:

Graal Script Code:
class Options extends TGraalVar[...]
function 
void saveOptions()[...]
function 
number addNumbers(number anumber b)[...] 
I've found this this makes it much, much easier to navigate large scripts that contain dozens of functions. I understand this isn't related to the actual language as much as it is a change to the code viewer, but it would be very nice to have nonetheless.
__________________
MY POSTS ARE PRONE TO EDITS!

Last edited by Jiroxys7; 04-19-2013 at 03:31 PM..
Reply With Quote