Hacker News new | ask | show | jobs
by coldtea 2561 days ago
>One of the things I keep reading about functional languages is how they make reasoning about code easier and how this is particularly useful for distributed systems. Given that Go was built by Google specifically for the purposes of building distributed systems, why isn't it functional?

1) Who said that what you "keep reading" about functional language is true?

2) Even if true, who said that what you "keep reading" about functional language is true in all cases?

3) Who said other factors don't come at play, and might be even more important?

4) Who said a language has to adopt functional principles wholesale, and isn't it enough that it has some (as languages increasingly get)?

5) Doesn't the IT industry always find some methodology to hype as the silver bullet, much akin to the diet industry? Maybe functional programming is one of them?

6) If you don't have personal experience with functional languages or can't personally appreciate whether they really do make "reasoning about code easier", why take what you read about them at face value? Perhaps they miss something?

7) To argue on the other side, who said that when a large company builds something, they get it right? Often it's the inverse.

8) Who said Go was built "by Google" in the strong sense? Go was a rogue project from a small team AT Google. It wasn't an official Google effort (the way Java was for Sun, .NET for MS, and so on) to make an official Google language. It's just that that group was concerned with "what language features would be a good fit for the work with do here at Google" -- but the inverse is not true, Google as a company/management/etc wasn't concerned with building such a language. They just went ahead with people devoting time to the project.

9) Who said the Go team has kept with the times (or even with older but still relevant PL research)?

What I write above are not answers and are not meant to be "the truth", they're meant to make one see the situation more critically.

1 comments

Re 1: Who said? Those who wrote the stuff being read, of course. (You're muttering "self referential" like that's some kind of a problem... /s)

Re 2 and 3: I think this is the big one. Functional language are great in some situations. Non-functional languages are great in some other situations. The problem is, someone who doesn't know functional languages gets into a situation where they're good, finds out about functional languages, starts using them, and a large number of their problems go away. They experience functional languages being wonderful. But they conclude "functional languages are wonderful" rather than "functional languages are wonderful in that situation", and they proceed to try to sell the world on how wonderful functional languages are. (Not just functional - ditto for other language styles and development techniques.)

The trick is, given the problem, to pick the right languages, tools, and techniques, rather than to have One Right Answer.

Re 9: I'd say, given Pike's background, that he almost certainly knew at least the older PL research. Ditto Kernighan (who didn't design the language, but did write the book).