Code Golf

I noticed a very popular post up on Stack Overflow yesterday, it was tagged as _code golf_. The idea is you complete the task or problem (golf) in the least number of characters (strokes).

Perl, Python, GolfScript (yes, really) and others were getting very low word counts. All the major languages were in there including C/C++/C#, Javascript and Java. I noticed Coldfusion wasn’t there so I thought I’d try a CF implementation of the problem. I got mine to work, but since I ran out of time and patience to hit all the requirements of the spec, I decided not to post it.

However, after dabbling in Ruby and Python these last few weeks, I really see a lack of functions in native CFML that address dealing with common data structures such as structures and arrays.

Also, the lack of chaining of functions in CFML makes for verbose code, which I have mentioned before.

I know some would create pure Java objects to deal with these issues, but it would be nice to see some of the Ruby-esque features implemented in native CFML.

Advertisements
This entry was posted in regular and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s