Re: Help with structs
- From: Jack Trades <jacktradespublic@xxxxxxxxx>
- Date: Fri, 27 Aug 2010 20:18:41 -0700 (PDT)
On Aug 27, 12:27 am, Behind China Blue Eyes <chine.b...@xxxxxxxxx>
wrote:
Any solution amounts to the same thing. There are a few things to reduce the
complexity, like a generic balance routine the pre-coerces arguments to a common
type.
I'm starting to lean toward something like that. I wrote it off
initially because I thought it would be inefficient for something like
(+ 1 2 3 4 7/8) where I could do integer addition for the first 4
numbers then coerce the result to a rational. However I'm starting to
think that may be premature optimization.
You can also flatten the switches with something like switch
(100*obj_1->type + obj_2->type).
I'm not quite sure how this would work. Why multiply by 100?
Thanks
Jack Trades
I thought Nobody Owens ended your organisation.
We're an elusive group!
Thanks
Jack Trades
.
- Follow-Ups:
- Re: Help with structs
- From: Seebs
- Re: Help with structs
- References:
- Help with structs
- From: Jack Trades
- Help with structs
- Prev by Date: Re: Help with structs
- Next by Date: Re: Help with structs
- Previous by thread: Re: Help with structs (OT)
- Next by thread: Re: Help with structs
- Index(es):