On Tue, Nov 27, 2012 at 12:54 AM, Bob Hartwig <bobjectssmalltalk@gmail.com>wrote:
Hi all,
I'm investigating the feasibility of porting a large VAST application to Pharo, so I may have some questions in the coming days. Here's my first question:
VAST has the concept of compile-time constants, using the ##() syntax. Whatever is in the parentheses is evaluated at compile time, and the result is stored, so the evaluation does not need to happen again when the method is sent later. E.g., when this method is sent:
printTheNumberToTheTranscript
Transcript nextPutAll: ##( 10 factorial asString ) .
no calculation or string conversion is necessary, because 10 factorial asString was evaluated at compile time and the answer was stored. Please note that this is different from array literals, which is how Pharo seems to treat this syntax.
As far as I can tell, Pharo does not have this feature (certainly not with that syntax), but I would love to be proved wrong. Am I?
Yes, it has it also. The array is stored as a literal in the compiled method.....I think the sintax was with only one #, like: #(10 factorial asString) can you try?
Does anyone else have words of wisdom regarding porting a VAST app to Pharo? Any other language features that are missing? I'm not too concerned about Pragmas, and this app has no GUI, so I'm not concerned about UI framework differences.
Thanks, Bob Hartwig
-- Mariano http://marianopeck.wordpress.com