LanguageThe new lang.Closeable interface and ARM blocksat 2010-12-31 in Language, Examples, 5.8-SERIES by friebeThe new lang.Closeable interface and the io.streams classes being retrofitted to implement it may not seem very useful on the first glance, although they serve the purpose of supporting the so-called ARM blocks. These are a feature supported by XP Language and reuse the try keyword: try ($expression[, $expression[, ...]]) { Any of the expressions are expected to be instanceof lang.Closeable and their close() methods are guaranteed to be called in the declaration order regardless of whether the block raises an exception or not. (more) XP language cheat sheet: Differences from PHPat 2010-10-10 in Language by friebeNow that we know the basics about the XP language - how to write a "hello world" application, how to compile and run it, and after looking at the underlying type system, and have seen both is quite similar to PHP - let's explore the differences, the object and concatenation operators, changed foreach, array and map syntaxes, the removed function keyword, as well as the now syntactically supported annotations, chaining, enumerations, varargs, and finally, the finally block. (more) The XP language's type systemat 2010-10-10 in Language by friebeAs promised in the first article of our XP language series, we will have a look at the type system. The XP language knows about the following types:
(more) First steps with the XP Languageat 2010-09-24 in Language, Examples by friebeThe XP language is not completely different from the way PHP works, it keeps the flexibility and the general "look and feel" while adding syntactical support for features PHP doesn't support or doesn't support in all versions the XP Framework runs on. Like in the XP framework, the entry point is always a class. In their most simple form, these classes have a static main() method. An example: public class HelloWorld {OK, this doesn't look too unfamiliar, does it? (more) Introducing: The next big thingat 2010-09-24 in RFCs, Language, 5.8-SERIES by friebeIf you have recently updated your SVN checkout, you may have seen a line like the following flying by: U devel/xp/trunk/rfc/0052.rfc.txtRFC #0052? Wait? Wasn't that this really old idea about something with compilation and total world domination? Right - scroll up a couple of lines in that svn update output and find well-sounding names ranging from DeadCodeElimination, Operator and TypeInstance to DefaultDiagnosticListener. Yes, we now have a compiler! It's optional, yes, and it doesn't require any special PHP setup, .dll, .so, .bundle, configuration, or anything else to work. Just XP. So, over the next time, we will provide a series of blog entries introducing the language, the compiler, optimizations, checks, the API. Stay tuned |
|