Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building a game, need a language with strongly supported first class functions

I'm building an educational game which, through it's modularity, allows for teaching students how to program. It's essentially a generic card game which can easily be modified.

The backbone of the game is supposed to be totally uneditable (at least in theory), so I need to build a "Card" type that allows for an anonymous function as it's action (even worse, or perhaps even more interesting, it needs an anonymous function that can have an arbitrary number of arguments).

I also need a strong GUI library, and it needs to be portable, and if at all possible it should be potentially be a web language. It should have extensive support for modularity, be object oriented, and hopefully be clear enough that it doesn't require an experienced programmer to understand the syntax. That's a lot of requirements, but I'm supposed to be detailed and I want a specific answer and why it'd be a good choice, so I should put as much information as possible I think. I have no real need for efficiency of the language, so low level languages are not necessary in this case, very high level languages will easily be fast enough.

Python isn't strong enough. Ruby may be but I'm not familiar enough with its features. Haskell and Scheme have the strongest support but aren't web languages and, so far as I know, don't have GUI libraries for the most part. C# may be reasonable, I'm not terribly familiar with its features, but I'm particularly worried about portability. If at all possible I'd like to avoid javascript, but if that really is the best option, I'll probably have to go in that direction.

like image 904
Michael Avatar asked Nov 29 '09 22:11

Michael


2 Answers

Javascript seems like a perfect choice for you - first class functions, portable, web-based, clear syntax, good library support. I know you're trying to avoid it, but I hope that once you've evaluated and rejected all other choices, that you'll give Javascript another chance.

like image 140
Mark Byers Avatar answered Sep 28 '22 16:09

Mark Byers


If you are familiar with Scheme, check out DrScheme programming environment.
It has GUI support and it's ported to Windows, Linux and Macintosh.

like image 30
Nick Dandoulakis Avatar answered Sep 28 '22 15:09

Nick Dandoulakis