Joel Uckelman on Thu, 5 Aug 2010 11:16:05 -0700 (MST)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [game-lang] defining static parts of games


Thus spake Simon McGregor:
> On Thu, Aug 5, 2010 at 5:27 PM, Joel Uckelman <uckelman@xxxxxxxxx> wrote:
> 
> > Some repetition syntax would be nice. I sort of feel like doing this:
> >
> > =A0for (int r =3D 0; r < 4; r++) {
> > =A0 =A0for (int c =3D 0; c < 4; c++) {
> > =A0 =A0 =A0printf("hex([%d,%d])", c, r);
> > =A0 =A0}
> > =A0}
> 
> Ergggghhh. Please, please don't ;-)

Are you groaning because you don't want it to look like C, or because
you don't want metaprogramming at all?
 
> 
> However, this doesn't have to reflect anything in the underlying
> language model.
> It could be pure syntactic sugar, with
> 
> col(a) + 1 =3D col(b)
> 
> being internally translated into
> 
> exists((c, d), _col(a, d) and _col(b, c) and equals(d, plus(c, 1)))
>

If that's happening, though, we have to have some way of specifying
how that translation is done. The interpreter won't be able to figure
it out on its own what the col() function does.
 
> ...although on second thoughts, we don't really want to be able to
> quantify over the integers. That's a quick route to doom.
>

I think that for games with playing surfaces which are infintite in all
directions, there's just no avoiding it.

-- 
J.
_______________________________________________
game-lang mailing list
game-lang@xxxxxxxxx
http://lists.ellipsis.cx/mailman/listinfo/game-lang