Christopher Lenz wrote:

> Hmm, couldn't the `Field` class keep a class-level counter that
> would be incremented on every instantiation, as well as assigning
> the current value to an "order" instance variable... then you could
> sort the fields passed to `with_fields` based on the "order" instance
> variable.
>
> Or am I missing something?

You are not missing anything, I am fairly confident that you could
implement field order-preservation using a technique similar to the
above.  However, it'd be a bit more complex than you state, since
global counters aren't exactly thread-safe :) We'd have to do some
`sys._getframe()` hackery, which would introduce a level of complexity
to the code that could be entirely avoided if we would drop support for
`with_fields` entirely.

So, yes it could be done, but no I don't think its worth it for such a
minor cosmetic difference.

--
Jonathan LaCour
http://cleverdevil.org


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SQLElixir" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to