Recent Posts
Chip's Tips for Developers
Return To Blog Listing
Programming tips, tricks, and examples from Chip Camden.
Recent Posts Tagged With 'fp'
A synthesis of new capabilities in Synergy/DE version 9
As I threatened in my last post, I’ve combined a lot of my Synergy/DE version 9 work into a single library, which I have named “synthesis”. Why synthesis? It’s a synthesis of most of my explorations of what I can do with Synergy/DE...
Lazy math added to Synergy/DE mappers
I mentioned in my last post on my ls class for Synergy/DE that it would be nice to include the mathematical operators in my support for lazy evaluation of mapping functors. If you don’t understand what that means, perhaps you should go read that ...
Sort methods added to ls class for Synergy/DE
Synergy/DE provides two built-in sorting functions, neither of which are useful for in-memory objects. That’s not too surprising, considering that objects are relatively new to Synergy/DE. The SORT statement performs a Tournament Sort, but it onl...
Properties: just like public member variables, except when they aren’t
Many object-oriented languages provide an abstraction called properties: data members that belong to a class instance, but whose public interface controls how those members can be manipulated via accessor methods. In languages like C#, VB.NET, an...
Progn for Synergy/DE
As we have seen, it’s often useful in Synergy/DE to do more than one thing in a single statement – especially when defining macros. One way you can join multiple operations is with a Boolean operator: status = (operation1() && operation...
Functional Let for Synergy/DE
Synergy/DE possesses a macro definition syntax that’s very similar to the #define syntax in C, but not quite as robust. It doesn’t support macros that expand to multiple lines of code. An individual parameter passed to a macro cannot be conti...
Functional “if” for Synergy/DE
Programmers who have used languages derived from C will be familiar with C’s ternary conditional operator: test ? iftrue : iffalse which tests test for truth and returns iftrue if it is true, or iffalse if it isn’t. No such operat...
