I've been reconstructing an old programming language.
It originally had a very simple but awkward macro
facility: if an identifier was declared as a macro,
whenever it was called, it could inspect/consume as
much of the remaining tokens as it wished and could
splice other tokens in. On top of
On Fri, May 25, 2018 at 10:12 AM, Ben Coman wrote:
>
>
> On 25 May 2018 at 21:22, Debiller 777 wrote:
>>
>> Well, I've already asked about adding new literals to pharo or Smalltalk
>> in general, however this time I have a better idea:
>> macros. Can they be added? Because if I understand
I need to say that this is not a good use case. First and most important is
that you should not have deployment switches in your code. Your system should
be configured for a special deployment mode not detecting in code. Second but
not least important you add references to test classes in your
2018-05-26 9:33 GMT+03:00 Clément Bera :
>
>
> On Sat, May 26, 2018 at 8:07 AM, Denis Kudriashov
> wrote:
>
>> Hi
>>
>> 2018-05-26 8:46 GMT+03:00 Clément Bera :
>>
>>> Just mentioning another use-case:
>>>
>>>
On Sat, May 26, 2018 at 8:07 AM, Denis Kudriashov
wrote:
> Hi
>
> 2018-05-26 8:46 GMT+03:00 Clément Bera :
>
>> Just mentioning another use-case:
>>
>> getDatabaseInstance
>> ^ (Production CifTrue: [Database] CifFalse: [MockDatabase]) new
>>
>
>
Hi
2018-05-26 8:46 GMT+03:00 Clément Bera :
> Just mentioning another use-case:
>
> getDatabaseInstance
> ^ (Production CifTrue: [Database] CifFalse: [MockDatabase]) new
>
I think following code will work:
getDatabaseInstance
^ (Production ifTrue: [Database]
Just mentioning another use-case:
getDatabaseInstance
^ (Production CifTrue: [Database] CifFalse: [MockDatabase]) new
Since I use conditional compilation more often than just precompiling
constants.
I don't see an equivalent of asMethodConstant AST manipulation at runtime
strategy in the
On Fri, May 25, 2018 at 10:44 PM, Esteban Lorenzano
wrote:
>
>
> On 25 May 2018, at 17:30, Clément Bera wrote:
>
> What about a preprocessor like the Java preprocessors ? The Truffle
> project relies heavily on that for high performance Java and it's
> On 25 May 2018, at 17:30, Clément Bera wrote:
>
> What about a preprocessor like the Java preprocessors ? The Truffle project
> relies heavily on that for high performance Java and it's quite nice. It's
> difficult to do that in Smalltalk right now.
>
> I think if
What about a preprocessor like the Java preprocessors ? The Truffle project
relies heavily on that for high performance Java and it's quite nice. It's
difficult to do that in Smalltalk right now.
I think if you want to do what are asking for you just need to write a
bytecode compiler extension.
On 25 May 2018 at 21:22, Debiller 777 wrote:
> Well, I've already asked about adding new literals to pharo or Smalltalk
> in general, however this time I have a better idea:
> macros. Can they be added? Because if I understand correctly they may be
> the only way to do
Debiller 777
wrote:
> Well, I've already asked about adding new literals to pharo or
Smalltalk in
> general, however this time I have a better idea:
> macros. Can they be added? Because if I understand correctly they may be
> the only way to do that.
Why do you think
Well, I've already asked about adding new literals to pharo or Smalltalk in
general, however this time I have a better idea:
macros. Can they be added? Because if I understand correctly they may be
the only way to do that.
13 matches
Mail list logo