This post originated from an RSS feed registered with Agile Buzz
by Oliver Steele.
Original Post: Functional Javascript 1.0.2
Feed Title: Oliver Steele on Software
Feed URL: http://feeds.feedburner.com/osteele
Feed Description: Languages of the real and artificial.
- More efficient Array.slice. (Credit: Dean Edwards)
- Memoize Function.lambda. (Credit: henrah)
Packaging changes
- Added jsmin version. With jsmin and gzip, the file is 2.5K.
- Moved string lambdas to a separate file, to-string.js. (Both files are included in the jsmin version.)
- Reformatted for new version of the doc tool.
Compatibility notes
If you were including ‘functional.js’ before, now you need to include both ‘functional.js’ and ‘to-function.js’ in order to get the string lambda conversion functions too. Or you can include functional.min.js, which is smaller and includes them both.
The fact that functional.js itself no longer contains any regular expression might make it usable in Flash. I haven’t actually tried this, because the only Flash I use is OpenLaszlo, which is stuck at the pre-JIT Flash 8. I don’t dare program at too high a level in Flash 8 because of performance concerns.
Meanwhile, over in Ruby…
I’ll also put in a plug here for Braithwaite’s String#to_proc, which is a port of string lambdas to Ruby. Ruby is my favorite server-side glue language; I look forward to using it there…