[Pharo-dev] Pharo and special unary selectors
astares at gmx.de
Fri Nov 17 04:32:05 EST 2017
just something to think about: one thing I always liked about Smalltalk is that it allows for nice DSL's. We have nice things
like a unit framework in Pharo, ...
In the most simple case one can easily implement own units just by providing a unary messages:
One can easily implement an own Money class with a currency and then do polymorphic tricks like
10 EUR + 20 EUR
But we can currently can not implement special unary selectors (including special unary selectors with unicode) like:
12 ‰ (for promille)
Especially things like 20 % would be nice for layout issues or other (Bloc comes to mind).
Maybe we should put that on the roadmap of Pharo because IMHO it would be cool to support such things in the
future. Dont know how much effort it currently means on the technical level but maybe others can comment.
More information about the Pharo-dev