I have seen examples of how you can use the Groovy AST transformations to extend the language, e.g. to log before and after a method call as shown here. However, would it also be possible to use this framework to extend the syntax of the language itself? For instance, what if I wanted to be able to parse and transform the following into ...
I am curious about the usage of the feature known as open classes or monkey-patching in languages like e.g. Ruby, Python, Groovy etc. This feature allows you to make modifications (like adding or replacing methods) to existing classes or objects at runtime.
Does anyone know if major frameworks (such as Rails/Grails/Zope) make (extensive...
I was looking at this question and started wondering what does the print actually do.
I have never found out how to use string.decode() and string.encode() to get an unicode string "out" in the python interactive shell in the same format as the print does. No matter what I do, I get either
UnicodeEncodeError or
the escaped string wit...
I'm sure WPF could produce a GUI replica, but is it actually made with WPF?
I've done some searching, but I'm not able to find what GUI library they used.
...
Ever since I started programming properly using good old VB6 and up until present day, I often still get burned (and just have) by this in programming:
if x == something or x == somethingelse
I often end up writing:
if x == something or somethingelse
Just out of pure interest, does any langauge/languages out there support this?
...