Pragmas seem to enable providing functionality in a "pull"-style
as opposed to actively scheduling code blocks for execution by some initialization mechanism. Does anybody have experiences to share about using pragmas? Typical pitfalls? Performance issues? How-to or How-not-to stories? Thanks, s. _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
The typical pitfall is that syntax isn't portable between Smalltalk
dialects--for anyone that cares. Pragmas first came into fashion as smalltalk needed efficient modular loading in runtime images. Pragmas in VA allowed things like globals to be load-sequenced before code that references them. Pragmas in VA were class methods with a special prefix. Those methods contained special syntax in comments that were used at load time to declare things like shared variables. Some people believed preLoad execution was a flawed design and thought inventing some new syntax was the best solution. "A declarative model" was the buzzword behind that movement. The new syntax was because VA license restrictions (at that time) didn't allow the compiler to be packaged in a runtime image. The syntax IBM used was very limited. The VW solution was to use parcels containing shared variable models derived from declarations in Smalltalk syntax. The VW solution was far better and it fits well in a vastly superior namespace design. VW uses pragmas to declare method attributes (method metadata). The only time I use VW pragmas is for declaring menus. I know VW method pragmas can be used for some really neat things but I tend to revert to using portable ways to do the same things. Paul Baumann -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Stefan Schmiedl Sent: Friday, July 18, 2008 6:11 AM To: [hidden email] Subject: [vwnc] Pragmas - do's and don't's Pragmas seem to enable providing functionality in a "pull"-style as opposed to actively scheduling code blocks for execution by some initialization mechanism. Does anybody have experiences to share about using pragmas? Typical pitfalls? Performance issues? How-to or How-not-to stories? Thanks, s. _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc -------------------------------------------------------- This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of IntercontinentalExchange, Inc. (ICE), its subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired. _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Hi Paul,
On Fri, 18 Jul 2008 15:27:35 -0400 "Paul Baumann" <[hidden email]> wrote: > The typical pitfall is that syntax isn't portable between Smalltalk > dialects--for anyone that cares. this is a point I'll have to keep in mind. > VW uses pragmas to declare method attributes (method metadata). The only > time I use VW pragmas is for declaring menus. I know VW method pragmas > can be used for some really neat things but I tend to revert to using > portable ways to do the same things. I've found some interesting occurrences in the Mocketry packages, too. They seem to be a way to keep information in the "visible" code pane, which would otherwise be "hidden" in more exotic places. Thanks, s. _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Stefan Schmiedl
Stefan Schmiedl schrieb:
> Pragmas seem to enable providing functionality in a "pull"-style > as opposed to actively scheduling code blocks for execution by some > initialization mechanism. > > Does anybody have experiences to share about using pragmas? > > Typical pitfalls? Performance issues? How-to or How-not-to stories? a portable alternative is to define an abstract superclass and collect concrete subclasses, e.g. "RBPlugin allSubclasses reject: [ : class | class isAbstract ]". URI and ImageReader work this way. _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |