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? 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 |
On Tue, Nov 27, 2012 at 12:54 AM, Bob Hartwig <[hidden email]> wrote: Hi all, 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?
Mariano http://marianopeck.wordpress.com |
In reply to this post by Bob Hartwig
On Tue, Nov 27, 2012 at 12:54 AM, Bob Hartwig <[hidden email]> wrote: Hi all, Not that I know. The first step is to fileout or somehow get the code from ENVY. Then start importing in Pharo. It would help if the app has tests in which case I recommend start porting the tests.
Pragmas are used in Pharo for more things than just UI. Anyway, Pragmas do also exist in VAST. Finally, I was going to say that the most complicated part of the port would be the UI, but if there is none, then easier.
Do you have a database? which frameworks/libraries do you use from VAST?
Mariano http://marianopeck.wordpress.com |
In reply to this post by Bob Hartwig
Hi bob
Why could be done is to extend the compiler (marcus did that in the past) to have compile time evaluation. Now how many times such feature is used in your application? Stef > 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? No it does not. > Does anyone else have words of wisdom regarding porting a VAST app to Pharo? Any other language features that are missing? Not really Did you check the float precision? > I'm not too concerned about Pragmas, and this app has no GUI, so I'm not concerned about UI framework differences. Do not hesitate to let us know the problem you encounter. > > Thanks, > Bob Hartwig > |
In reply to this post by Mariano Martinez Peck
On Tue, Nov 27, 2012 at 9:04 AM, Mariano Martinez Peck <[hidden email]> wrote:
Mariano http://marianopeck.wordpress.com |
Free forum by Nabble | Edit this page |