[dundee] Tiling Window Managers.... XMonad anyone?
Rick Moynihan
rick.moynihan at gmail.com
Fri Jul 10 21:44:02 UTC 2009
2009/7/10 Iain Barnett <iainspeed at gmail.com>:
> 2009/7/9 Rick Moynihan <rick.moynihan at gmail.com>
>>
>> I don't think it's splitting hairs at all... I'd also argue that
>> declarative languages like XSLT and SQL, which though similar to
>> functional languages aren't because they don't have a representation
>> of functions are as a first class data type.
>>
>> Whilst the features that you list are features commonly found in
>> functional languages, the core property that is to my knowledge common
>> to all (accepted) functional languages is that functions can
>> themselves be treated as values.
>
> Perl has that feature (almost all the FP features, in fact) but wouldn't be
> considered an FP language by most. I think the most important feature is the
> aim for lack of side effects by keeping most functions pure.
>
> If a function is pure then it could be passed around because it has become a
> declaration, and therefore just data, but I don't see that it's necessary
> for the language, just a likely by-product.
Perl is very much multi-paradigm with lots of things like OO/FP etc...
bolted on to an imperative core. It's as much the conventions of Perl
programmers that make it not widely regarded as a functional program,
though I'd probably be more inclined to refer to a Perl programs
written in a functional style as being a functional program than I
would even the most pure SQL statement. SQL is declarative and though
it allows the construction of essentially a single function (the
query) it's lack of HOF's as the means of composable abstraction are
the kicker for me.... Prolog, XSLT and other declarative languages
are in many ways the same. After fumbling about in this argument for
a while, this is for me the key difference... And it is an important
distinction, particularly as it's a key concept in lambda calculus,
which is where all this functional stuff comes from anyway!
I concede that declarative languages can also be functional but as a
group they include languages from completely different branches of
mathematics e.g. set theory, formal logic etc...
> C#, for instance, also has delegates (which they keep changing the syntax
> to, annoyingly for my brain) but it's definitely not FP, more of a
> convenient extension. Even LINQ, which is definitely functional, is just
> used as a convenient form of abstracting data - the new embedded SQL
> statement!
>
> Though they do share the most important feature (by my reckoning), I'm not
> sure CSS and HTML should count as anything other than a representation of
> data as they can't be "run". But then, isn't that what a well written
> functional program (or at least function) is aiming for? Like a dispatch
> table, for instance.
If you're thinking in purely declarative terms there is no concept
"run"... But in reality in what way does CSS not run? You can easily
argue that the browser executes CSS to perform a rendering
transformation. It's lack of Turing completeness doesn't prevent it
from being a declarative langauge. If anything it's MORE declarative
than SQL or Haskell, though it's certainly not functional ;-)
R.
More information about the dundee
mailing list