I wonder if it would make sense to add functional programming concepts to lucee?
Do you have specific concepts in mind? I ask because I’m wondering what you think FP is about (given the link you added).
Or stay more or less an OO language?
We’re talking about .lucee scripts being like CFCs and there’s been a lot of progress switching from typeFunction(data,args) style calls to data.function(args) style calls, e.g., myArray.map( function(elem) { return 2 * elem; } )
What are the pros and cons?
I can talk your ear off about the benefits of functional programming
Would it be possible for Lucee to have advantages over Scala and Clojure?
Every language has pros and cons and is better for certain things than other languages. Scala and Clojure are both extremely different to Lucee (CFML). I’ve used all three in production. Scala is primarily an OOP language with a strong static type system that also supports FP style coding (painfully, IMO, which is partly why I no longer use Scala). Clojure is an FP language with a strong dynamic type system that also supports some useful facets of OOP style coding (very elegantly). Scala is “traditional” insofar as it’s “like” Java with a lot less boilerplate and syntax noise (although it can be argued that Scala also adds its own flavor of “noise” in terms of syntax). Clojure is a Lisp so it’s homoiconic (code is data).
Here a link with some infos: Google Code Archive - Long-term storage for Google Code Project Hosting. http://code.google.com/p/functionalcf/
You understand that’s just a Lisp interpreter written in CFML, right? See Nick’s post on his mailing list (the only post, from back in 2011):
https://groups.google.com/forum/#!topic/functionalcf-discuss/2vl9V12LXHw <https://groups.google.com/forum/#!topic/functionalcf-discuss/2vl9V12LXHw>
Sean Corfield – (904) 302-SEAN
An Architect’s View – http://corfield.org/
“Perfection is the enemy of the good.”
– Gustave Flaubert, French realist novelist (1821-1880)On Feb 6, 2015, at 2:08 AM, @thorsteneilers wrote: