TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Deconstructing Functional Programming [video]

106 pointsby newgameover 11 years ago

12 comments

Peakerover 11 years ago
Gilad Bracha sounds like he hasn&#x27;t used a typed language long enough to stop struggling with basic type errors.<p>As such, it is of a position of extreme ignorance that he speaks of the uselessness of type checking and inference.<p>Claiming Smalltalk has the best closure syntax shows he doesn&#x27;t understand call by need. Haskell defines easier to use control structures than Smalltalk.<p>Claiming patterns don&#x27;t give exhaustiveness, ignoring their extra safety shows Gilad doesn&#x27;t understand patterns.<p>Claiming monads are about particular instances having the two monad methods, when they are about abstracting over the interface, shows Gilad doesn&#x27;t understand monads.<p>Claiming single argument functions have the inflexibility of identical Lego bricks shows he doesn&#x27;t understand the richness of function types and combinators.<p>In short, Gilad sounds to me very much like a charlatan who&#x27;d benefit greatly from going through lyah.
mafribeover 11 years ago
I found Bracha&#x27;s talk poor. That guy really has a chip on his shoulder vis-a-vis functional programming. A lot of things he said were not well though out. Here are some examples.<p>- He claimed that tail recursion could be seen as the essence of functional programming. How so?<p>- He complained that tail recursion has problems with debugging. Well, tail recursion throws away stack information, so it should not be a surprise. You don&#x27;t get better debug information in while loops either. And you can use a &#x27;debug&#x27; flag to get the compiler to retain the debug information (at the cost of slower execution).<p>- His remarks about Hindley-Milner being bad are bizarre. Exactly what is his argument?<p>- His claims about pattern-matching are equally poor. Yes, pattern matching does some dynamic checks, and in some sense are similar to reflection. But the types constrain what you can do, removing large classes of error possibilities. Moreover, typing of patterns can give you compile-time exhaustiveness checks. Pattern matching has various other advantages, such as locally scoped names for subcomponents of the thing you are matching against, and compile-time optimisation of matching strategies.<p>- He also repeatedly made fun of Milner&#x27;s &quot;well-typed programs do not go wrong&quot;, implying that Milner&#x27;s statement is obviously non-sense. Had he studied Milner&#x27;s &quot;A Theory of Type Polymorphism in Programming&quot; where the statement originated, Bracha would have learned that Milner uses a particular understanding of going wrong which does <i>not</i> mean complete absence of any errors whatsoever. Milner uses a peculiar meaning, and in Milner&#x27;s sense, well-typed programs do indeed not go wrong.<p>- He also criticises patterns for not being first-class citizens. Of course first-class patterns are nice, and some languages have them, but there are performance implications of having them.<p>- His critique of monads was focussed on something superficial, how they are named in Haskell. But the interesting question is: are monads a good abstraction to provide in a programming language? Most languages provide special cases: C has the state monad, Java has the state and exception monad etc. There are good reasons for that.<p>- And yes, normal programmers could have invented monads. But they didn&#x27;t. Maybe there&#x27;s a message in this failure?
评论 #6945206 未加载
评论 #6958218 未加载
taericover 11 years ago
First, thanks for all involved in getting this posted!<p>I&#x27;m somewhat curious on why the industry has such an aversion to simulating things in our mind. Especially when this seems to be one of the arguments employed against monads in this speech. That it basically couches something known in an odd name that is not known. Isn&#x27;t this just stating that it is bad <i>because</i> it confuses the simulator that is the reader?<p>That said, the live coding aspect is something that I am just now learning from lisp with emacs. Being able to evaluate a function inline is rather nice. It is somewhat sad, as I still wish I could get a better vote in for literate programming. (Betraying my appeal to the human factor moreso than the mechanical one.)
评论 #6942488 未加载
bunderbunderover 11 years ago
Great talk. Particularly the bit on the value of naming things - I rather wish he&#x27;d flogged that a bit harder.<p>As time goes on I&#x27;m finding it more and more frustrating to try and maintain code that relies entirely on anonymous and structural constructs without any nominal component. Yes, I do feel super-powerful when I can bang out a bunch of code really quickly by just stacking a bunch of more-or-less purely mathematical constructs on top of each other. . . but as the story of the Mars Climate Orbiter should teach us rather poignantly, when you&#x27;re trying to engineer larger, more complex systems it turns out that meta-information is actually really useful stuff.
评论 #6945440 未加载
vitdover 11 years ago
I&#x27;m just learning functional programming with Haskell, and it was great to hear him explain that learning Haskell is really hard because of the terminology. I feel a little (just a little) less stupid.<p>That said, he&#x27;s a terrible presenter. His smarmy style was really off-putting, and his motives a little sketchy. He spends a good portion of the talk slamming just about every language in existence except for the two he works on (Dart and Newspeak). It seemed very disingenuous and I don&#x27;t need another ranting nerd spouting venom about why something&#x27;s not very good in that holier-than-thou tone. I would have rather had a straightforward talk showing the strengths and weaknesses than the bitter tone this had.
agentultraover 11 years ago
This is a brilliant talk. It&#x27;s getting far too easy to annoy the FP cult(ure).<p>As an aside, Scala is not unique in marrying a FP approach with an OO system. CL has had CLOS, IMO one of the better implementations of &quot;OO&quot; outside of Smalltalk, for much longer than Scala.<p>Definitely watch this!
评论 #6942515 未加载
评论 #6942210 未加载
jstratrover 11 years ago
Interesting talk! Bracha has some good arguments against features that I generally enjoy in programming languages, like Damas–Hindley–Milner type inference and pattern matching.<p>Regarding Haskell: The points he makes against obtuse names based in category theory are valid, but then again, Haskell has its roots in research programming languages. Math-based terminology makes more sense for an academic audience.
评论 #6942196 未加载
namelezzover 11 years ago
In his talk on currying, he mentioned replying on type system to not be a good thing. Does anyone know the reasons behind his view?
评论 #6942393 未加载
delinkaover 11 years ago
Can we get an [audio] indicator?
kaelukaover 11 years ago
YES, I&#x27;ve been waiting for this! Thanks so much! :)
DanWaterworthover 11 years ago
TL;DR FP hater talks about FP.
RyanZAGover 11 years ago
I&#x27;m going to save these HN comments for 5 years time when the hype on functional programming has died down a bit. Will be very humorous to read this again then.
评论 #6943045 未加载
评论 #6942426 未加载