|
|
|
|
|
by mpweiher
3849 days ago
|
|
Well, Objective-C's message names came from Smalltalk: context circleWithFill:'solid' at:x@y radius:5.
These keyword messages actually go a long way towards bridging the gap between API and DSL.What Grace does is based on this approach, but goes significantly beyond it in closing the gap further by allowing the parameter parts to be regular languages. So as a somewhat silly example you could have a single method that draws circles of the same size and fill at many different locations: context circlWithFill:'solid' at:20@30 at:30@30 at: 100@20 radius:5.
Depending on the definition of the method, the 'at:' part could be repeated 0-n times. It's pretty amazing.https://michael.homer.nz/Publications/DLS2015/paper.pdf |
|