The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Vassili explains where Pragmas came from

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Vassili explains where Pragmas came from Posted: Feb 27, 2007 1:42 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Vassili explains where Pragmas came from
Feed Title: Michael Lucas-Smith
Feed URL: http://www.michaellucassmith.com/site.atom
Feed Description: Smalltalk and my misinterpretations of life
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Michael Lucas-Smith

Advertisement

From Vassili:

I'm not sure what truth you are searching for, but for what it's worth pragmas, like many other things in VW, are the way they are because they were shaped gradually over the course of several years. You may waste your time presuming a deep meaning hidden in everything.

FWIW, here is the history in a nutshell. Pragmas appeared in VW 3.0 as menu extension mechanism (they were only allowed in ApplicationModel, I think, and only the #menu... pragmas). Sometime around 5i.2 they were generalized to other uses, so that any class could declare its own set of arbitrary pragmas. A release or two later declarations were relaxed so that the use of an undeclared pragma generated an warning rather than an error. BTW, AnnotatedMethods do not store Pragmas--annotations are MessageSends. As I understand, the original plan was that annotations would be a superset of pragmas. A pragma is an annotation that comes from an angle bracket thing in the source, but it was assumed there could be other annotations as well. As for the Pragma class, it was and still is purely a search and access mechanism that I wrote around VW5i.4 or VW7 to use pragmas without enumerating Methods and MessageSends by hand. These are the "cultural layers".

Pragma in Squeak is very similar because it is derived from the implementation I did for Dan Ingalls so that he could port Hobbes to Squeak. I see it by the class comment I wrote, though for whatever reason it is missing the attribution to VW I put there. Sadly, also missing is the #withArgumentsDo: instance method, apparently because someone didn't recognize its value in writing code referring to pragma arguments by names rather than by positions.

Could Pragmas be named and work differently? Sure, and there are much better ways. But the thing is, they grew into what they are naturally rather than according to a coherent comprehensive design from the ground up. And so it goes.

Read: Vassili explains where Pragmas came from

Topic: Industry Misinterpretations 24: Threading Previous Topic   Next Topic Topic: Cairo Update

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use