Thread: Gs3
View Single Post
  #29  
Old 04-13-2013, 05:05 AM
Gamerkid7 Gamerkid7 is offline
Registered User
Join Date: May 2006
Posts: 10
Gamerkid7 is an unknown quantity at this point
I agree with fowlplay4 and Gos_pira. I much prefer a Java-like syntax. The type declarations of the proposed GS3 just looks clunky and is needlessly different than common languages.

One feature that I would love to see is proper closures. Anonymous functions are great but don't maintain any context. This would make utility libraries extremely versatile. For example, a remove_if() method that takes a list and predicate function:

PHP Code:
function void removeIDs(int [B]rem_id[/B]) {
    
remove_if(this.idlist, function bool (int obj_id) {
       if (
obj_id == [B]rem_id[/B])
           return 
true;
       return 
false;
    });
    
UpdateDiplay();  

Then the code for remove_if only has to be maintained in one place and it would be a lot easier to figure out what a piece of code is doing from the functions being called.

Last edited by Gamerkid7; 04-13-2013 at 07:50 PM.. Reason: void->bool
Reply With Quote