Programming Languages Arenā??t

Posted by on under |

When recovering from some kind of mental overload, I often fall into my old patterns of thinking about programming languages. Today is no exception! Generally, when we talk about programming languages, we usually mean things like, C, C++, Java, Perl, PHP, etc. I think that, over time, this narrow definition of what a programming [...]

Fun With LLVM & Whirl

Posted by on under whirl, languages |

It’s been a long time since I wrote any code purely for fun - but I recently finished just such a project. Pretty much ever since I heard about LLVM I’ve wanted to do something with it. The obvious choice was to build a compiler for one of my esoteric languages. Well, I finally got around [...]
Tagi: whirl, languages

Various Object-Oriented Design Dilemmas

Posted by on under object oriented design, design dilemmas |

[ Concrete or Abstract or Tool ] A concrete Box object may represent an actual on-screen box where if you adjust the x or y properties of the object, the on-screen box moves and if you remove or delete the Box object, the visible box goes away. An abstract Box object may simply be a container [...]
Tagi: object oriented design, design dilemmas

Trying Objective-C Blocks

Posted by on under objective c, array, interface, languages |

Today I was experimenting with Objective-C’s blocks so I thought I’d be clever and add to NSArray a few functional-style collection methods that I’ve seen in other languages: @interface NSArray (FunWithBlocks) - (NSArray *)collect:(id (^)(id obj))block; - (NSArray *)select:(BOOL (^)(id obj))block; - (NSArray *)flattenedArray; @end The collect: method takes a block which is called for each item in the array and [...]
Tagi: objective c, array, interface, languages