This post originated from an RSS feed registered with Agile Buzz
by James Robertson.
Original Post: Smalltalk Daily 7/22/08: Using Pragmas
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
On today's Smalltalk Daily, we take a look at Pragmas. There's been a discussion about those recently on our mailing lists, and Michael posted on it today - I like this summation:
So why do we blend the source code to a method with the signature of a method? Well, pragmatism. It's incredibly convenient to be able to edit the signature with the code itself. When you stop to think about it - pragmas are the same. Is it easier to pull down a menu to define an attribute on a method, or easy enough just to write some code that you can copy, paste, move around, edit - all in the same place that's contextually bound to the method you're actually working on...