On Thu, Aug 10, 2006 at 05:12:37PM +0900, Francis C. wrote:
This thread has probably gone on long enough
but as I read it, what
you’re saying here amounts simply to “let’s take what’s good from each
approach and apply it generally.” Can’t argue with that.
Yeah, that one’s usually difficult to argue. Since the first time I
started working with a language that allowed (actually encouraged)
prefix notation, I’ve wished for other languages I’ve used to allow it
as well (such as Perl, et cetera – though I suppose I could write a
module to handle that, or possibly even find one in CPAN).
on this thread try to relate this benefit of functional languages to
non-functional ones.
My commentary about a functional “style” being largely centered around
syntax wasn’t meant to indicate that only the syntax of functional
programming should be borrowed. In fact, while there are certain
syntactic features that might be borrowed from functional languages for
certain purposes in Ruby, I think Ruby’s syntax is pretty much perfect
for it as it is. It might be nice to borrow a little more from its
semantic structure, too, though.
I’m not really sure how that could be accomplished without causing
problems for some of the excellent characteristics already embodied by
Ruby, though. If we made Ruby too “functional”, it would just be a Lisp
dialect anyway – and while Lisp is great, so is Ruby.
To answer someone else, the ability to automatically process programs is
why I’m interested in mini-languages (DSLs) written in Ruby that are
non-Turing complete, because they may be decidable, if designed
properly. That opens the way (in theory) to the kind of automatic
correctness analyzers that you see in pure functional programming. The
potential economic benefit is staggering. What proportion of your
programming time do you spend debugging today?
That certainly sounds useful.
If people see the distinctions between “functional” and “non-functional”
languages purely in syntactic terms, then this whole discussion is
really no deeper than yet another Ruby vs. Python debate.
I’m really not a fan of Python. It’s just . . .
Oh, wait, scratch that – I don’t want to start a flame war.