News for hackers. Stuff that matters.
Re:Why functional programming matters (1990) [pdf] by cageface on Thursday May 07, 2015 @02:50AM (#9503619)
I wish more discussions of the values of FP were this pragmatic. FP has brought some very valuable ideas into the mainstream, along with a few bad ones and many for which the jury is still out. I get a little tired of the people that see Haskell, for example, as the One True Way when it's clear it's a language design with its own set of tradeoffs, just like all the rest.
Re:Why functional programming matters (1990) [pdf] by mbrock on Thursday May 07, 2015 @05:32AM (#9503972)
I guess there are a few people out there who would claim a "One True Way," but mostly that seems to be a stereotype?

As for me, I get a little tired of these pseudo-objective "debates" trying to decide which programming language is "better" by evaluating bullet lists, trends, and so on.

It seems pretty clear that different people can be very productive in different languages and using different techniques. Different projects and companies use different language; that's a plain fact.

For someone who's working with a happily functioning system written in, say, Haskell, it's a little weird to go on discussion forums and see people arguing over whether or not Haskell is a "productive" language.

In almost every HN thread about something related to Haskell, there'll be a few comment threads started by someone who claims that "functional programming doesn't work in the real world" or that "laziness is only good for research papers" or something like that. That's frankly flamebait by now, and I'm generally saddened by how much of the discourse about functional programming (on here, specifically) becomes this kind of groundless fight about whether or not it's possible to build real software with it.

Yes, of course Haskell, as a real-world thing instead of a perfect Platonic idea, has flaws, things that could be improved, problems one has to work around, and so on. That is inevitable and it is true for all programming systems ever!

It's always interesting to hear from people who have made good-faith efforts to use functional programming techniques and systems, and failed. Specific complaints, even feelings and vague opinions, are useful information—when they come from experience.

Anyway, that's my rant for today about the discourse on functional programming...

Re:Why functional programming matters (1990) [pdf] by mafribe on Thursday May 07, 2015 @05:48AM (#9503994)
I think we all agree that the most important variables determining a programmer's productivity with a language (a) are how familiar/comfortable the programmer is with the language and (b) what libraries and tools are available. Language discussions take this as given. They are about what we can say about languages if we hold these factors (familiarity, ecosystem) constant. Is there still a difference, and those who participate in such debates think, yes there is.

There is another dimension to language wars: discussing languages is part of language learning, part of becoming a master. After all, teaching/discussing is one of the most efficient learning tools, and having to defend one's language helps to clarify one's own thoughs, in parts by looking at it from other peoples perpectives.

Re:Why functional programming matters (1990) [pdf] by mbrock on Thursday May 07, 2015 @06:16AM (#9504056)
I'm not sure I agree with your exact formulation of what determines a programmer's productivity (and I think the notion of "productivity" is somewhat mystifying), but I somewhat agree that we can abstract away the concrete differences in programmer familiarity and pragmatic tooling.

Although even there, I'm hesitant. There's a sense in which the idea of the language as separate from its tooling is a judgment in itself, one that tends to divide the language community into camps already. For example, Smalltalk, Forth, and Common Lisp are radically "integrated" systems, in which the languages themselves can be redefined at runtime. There, it's in a way academic to talk about the formal grammar and semantics of the language in a "Platonic" sense.

But that might be a tangential point.

Probably I am uninterested in and somewhat averse to the kind of language discussion you're defining. I think that "language systems" operate in the world in complex ways, only a fraction of which are accessible through bullet-point-style comparisons of PL features.

And something about the interminability of "language wars," like the eternally recurring static-vs-dynamic skirmishes, fuels my aversion. I've heard so many pseudo-objective arguments for and against static typing, and these arguments have had so little cash value, that I've become skeptical of the whole mode of discussion.

So I'm much more interested to hear about, say, concrete successes or failures (or ongoing attempts) using static or dynamic typing (or laziness, or what have you) in concrete real-world settings.

Re:Why functional programming matters (1990) [pdf] by loup-vaillant on Thursday May 07, 2015 @07:21AM (#9504251)
> For example, Smalltalk, Forth, and Common Lisp are radically "integrated" systems, in which the languages themselves can be redefined at runtime. There, it's in a way academic to talk about the formal grammar and semantics of the language in a "Platonic" sense.

Not as academic as you might think. We could analyse how easily a language makes such an integration possible. I'm not sure you could have a lispy environment in C, for instance.

Once you know what kind of ecosystem a language enables, you can compare those ecosystems. (As opposed to existing ecosystems, which are highly influenced by sheer popularity and historical accidents.)

Re:Why functional programming matters (1990) [pdf] by lmm on Thursday May 07, 2015 @06:06AM (#9504032)
Thought experiment: if Haskell were actually the One True Way, what would you expect to be different? Would you be able to tell?

To say "every language design has its own set of tradeoffs" implies that all languages are equal, but that's clearly not true; we can all think of languages that are worse than others. I'm not at all convinced that there isn't an overall best language out there (I don't think it's Haskell, FWIW).

Re:Why functional programming matters (1990) [pdf] by dllthomas on Thursday May 07, 2015 @12:00PM (#9506004)
'To say "every language design has its own set of tradeoffs" implies that all languages are equal'

I don't think that implication is there at all. It absolutely doesn't hold for strong notions of equality - strong equality of all languages should imply that they all share a single set of tradeoffs.

It also clearly doesn't hold for "equal suitability to any purpose", since something less suitable to the purpose may be traded off for something more suitable.

I think any general notion of "equality of quality" can probably be viewed as a special case of the above reasoning - we are picking a set of attributes, of benefits and drawbacks - but we've no guarantee that they all net out the same however we are measuring them.

Re:Why functional programming matters (1990) [pdf] by seanmcdirmid on Thursday May 07, 2015 @06:13AM (#9504047)
Is there a best human culture? Clearly some are further down the tech tree than others, but...is imperialism really inevitable?

PHP isn't a bad language if its tradeoffs work for you. But you would be hard pressed to see anything good today in BASIC from the 80s (like we might miss things if we all of a sudden were sent 1000 years back in time). There is no best PL, but there are new PL technologies that make programmer experiences better; using a language that doesn't include at least a few of those technologies is probably going to be a handicap (compared to your peers who are using them). Haskell is bit up the tech tree, but not incredibly so compared to other modern languages like Scala and even C#.

Re:Why functional programming matters (1990) [pdf] by lmm on Thursday May 07, 2015 @06:28AM (#9504080)
It's politically unacceptable to say so, but some human cultures are clearly worse than others, and yes, I expect there probably is a best culture. I wouldn't begin to guess at which one that is, but I would take people seriously if they're saying that a particular culture has got particular things right and other cultures can learn from that. The problem with imperialism was less the culture and more the exploitation and theft, which is not really relevant to the programming language case.
Re:Why functional programming matters (1990) [pdf] by seanmcdirmid on Thursday May 07, 2015 @07:11AM (#9504206)
There is probably not a best culture (though there are definitely bad ones), just cultures that are further down the tech tree and therefore can out compete other ones. The same is true with programming languages.
Re:Why functional programming matters (1990) [pdf] by tome on Thursday May 07, 2015 @04:42AM (#9503876)
I would be interested to hear what the bad ones are.