Esteban A. Maringolo wrote:
Are you going to be the end user of this? I wouldn't let users compile whatever Smalltalk expressions they want. You can't scope the globals that can be accessed by the compiler. CompilationContext had instance variable /environment/ that contains a SystemDictionary(lots of globals). I wonder how effective it would be, or how horribly it would break things, to change that for a limited list. cheers -ben What I would do is model a hierarchy of "Condition" objects used by "Filter" objects, which are composable, and know how to translate themselves to SQL, Mongo condition, or even Smalltalk expressions to apply the conditions to a collection of objects.The other way is to have a DSL, but that's a longer road if what you plan is simply to apply filters. We've done both in my previous job and worked perfectly. Regards! Esteban A. Maringolo 2014-07-14 12:19 GMT-03:00 Norbert Hartl <[email protected]>: |
- [Pharo-users] Storing block closure code Norbert Hartl
- Re: [Pharo-users] Storing block closure code Esteban A. Maringolo
- Re: [Pharo-users] Storing block closure code Norbert Hartl
- Re: [Pharo-users] Storing block closure code Ben Coman
- Re: [Pharo-users] Storing block closure ... Dale Henrichs
- Re: [Pharo-users] Storing block clos... Norbert Hartl
- [Pharo-users] Number is not acc... Verkoster Info
- Re: [Pharo-users] Number is... Norbert Hartl
- Re: [Pharo-users] Number is... Esteban A. Maringolo
- Re: [Pharo-users] Number is... Camille Teruel
- Re: [Pharo-users] Numbe... Camille Teruel
- Re: [Pharo-users] Numbe... Verkoster Info
- Re: [Pharo-users] Numbe... Alain Busser
- Re: [Pharo-users] Numbe... Max Bareis
