Live data from Hacker News

“Mostly functional” programming does not work

queue.acm.org

181–190 of 205 posts

Re: “Mostly functional” programming does not work

#181

I think, this is a marketing article (the author is working as a consultant now). With all due respect to Erik Meijer for his contribution to functional programming, this article disseminates FUD that you are using functional features of programming languages incorrectly. In my experience, using imperative programming with elements of functional, is very productive, and I don't need to introduce monads everywhere to…

Nah, Erik has held this opinion for a long time and has expressed it repeatedly in various videos on channel9: http://channel9.msdn.com/Tags/erik+meijer

Re: “Mostly functional” programming does not work

#182

Earlier quoted context omitted.

Do you have any plans to release the code you have so far? Seems it'd be a fairly big effort to catch up with where you got to so far, especially the live editor.

Actually, the really nice thing is that the live editor is easy to build on top of the programming model! Once the pieces work a bit better, I'll try to put this on codeplex (though WPF/windows only...).

Great. Is there some way we can find out when you release it?

Re: “Mostly functional” programming does not work

#183

Earlier quoted context omitted.

I find your rant slightly insulting, off-topic, and lacks substantial information. "Learn Haskell because I say so." Why? No. But let me do something you didn't do, which is to actually explain my position. Hybrid languages afford a flexibility and power not available to language puritans. It's very nice to have things first-class DSLs that don't rely on slow monad stacks, heterogeneous lists that don't rely on exist…

I am fed up with these "pure" people. They have hijacked every sane discussion about programming into a condescending -- "Do you have monads and typeclasses ?". It's absolutely unhealthy. State is not Evil. Languages like clojure, scheme take imperative features and give it more beautiful abstractions. In what profession, do you find people complaining about the very foundations and thinking it's cool ? It's like Mus…

> It's like Musicians saying Rhythm is stupid.

I love that sentence. It makes me think Haskell is like Bartok.

Re: “Mostly functional” programming does not work

#184

Earlier quoted context omitted.

> Learn Haskell properly and then see for yourself why "hybrids" are a waste of time. /rant Getting tired of puritans. You people are selling functional programming on the basis of "ideology", not merits. Can the following be done in Haskell ? * A Real Operating System. * GPU programming. * Embedded programming. * If you can do all the above, can you replace Verilog ? * Financial Programming. Ocaml is one of the "hyb…

There are a number of toy operating systems written in Haskell. There are not very many "real operating systems" being written in any language, because it is a tremendous undertaking for uncertain value in a space that already has significant players with platform-effect lock in. I don't see why building a "real OS" in Haskell would be much harder than building a "real OS" in other languages, though. I don't know any…

hypocrisy: the practice of claiming to have moral standards or beliefs to which one's own behavior does not conform; pretense.

"GHC can target some quasi-embedded platforms these days, but it's also possible to write embedded programs in (pardon the overloading) an embedded DSL that can compile to C."

Haskell can't do any useful work without relying on C. Instead of having pride in what C can do, you have invented the following adjectives "hybrid", "mathematical language", "insecure", "impure", "pure".

Either,

1) Stop with the adjectives and get Real.

2) Prove that Haskell can replace C, the "impurity".

The same holds true for mathematical heritage. I would ask mathematicians to use Mathematica, not Haskell.

(I don't consider OCaml to be a part of this debate because OCaml is hybrid and Real, like C++)

Re: “Mostly functional” programming does not work

#185

Earlier quoted context omitted.

Actually, the really nice thing is that the live editor is easy to build on top of the programming model! Once the pieces work a bit better, I'll try to put this on codeplex (though WPF/windows only...).

Great. Is there some way we can find out when you release it?

I post to lambda the ultimate [1] often; if you check there occasionally, you can probably get a good idea of what I'm doing. Hopefully when I get this working, it will be a big enough deal that it will be easy enough to publicize :)

[1] http://lambda-the-ultimate.org/

Re: “Mostly functional” programming does not work

#186

Earlier quoted context omitted.

There are a number of toy operating systems written in Haskell. There are not very many "real operating systems" being written in any language, because it is a tremendous undertaking for uncertain value in a space that already has significant players with platform-effect lock in. I don't see why building a "real OS" in Haskell would be much harder than building a "real OS" in other languages, though. I don't know any…

hypocrisy: the practice of claiming to have moral standards or beliefs to which one's own behavior does not conform; pretense. "GHC can target some quasi-embedded platforms these days, but it's also possible to write embedded programs in (pardon the overloading) an embedded DSL that can compile to C." Haskell can't do any useful work without relying on C. Instead of having pride in what C can do, you have invented th…

You asked some questions, I answered them in an attempt to be helpful. Any conclusions you draw about my personal beliefs are spurious and roughly as well founded as your conclusions generally. For what it's worth, I write a bunch of C and I like C very much. I also like Haskell and have to say you really don't know what you're talking about here. I'm not interested in dealing further with these kinds of ramblings, at this point.

Re: “Mostly functional” programming does not work

#187

Earlier quoted context omitted.

Now that I've read your post, I'd say that impurity is much more similar to "goto" than with object orientation. A language with "goto" is not structured. It does not matter how often it's used, or how similar the rest of the language is to a structured one. The same is true for side effects. (Funny thing that the most used language has both.)

Donald Knuth uses GOTO. It is perfectly safe if kept within a function: invoke a function, jump around like crazy inside it, exit to caller with return value. No problem.

Last I looked, jumping around like crazy was hard for compilers to follow and would cut short some optimization. Not an issue when Knuth was originally writing, much more of one today. It's possible that this has changed, though - it's been a while since I played with this in depth. There remains Dijkstra's issue that it can be hard for humans to follow in any event, which Knuth didn't really directly dispute - his position was that there remained some narrow use cases where the speed improvement was worth it, which is different than "jump around like crazy".

Re: “Mostly functional” programming does not work

#188

Earlier quoted context omitted.

Now that I've read your post, I'd say that impurity is much more similar to "goto" than with object orientation. A language with "goto" is not structured. It does not matter how often it's used, or how similar the rest of the language is to a structured one. The same is true for side effects. (Funny thing that the most used language has both.)

If code is structured or not is not really a property of a language, every function call is effectively a "goto" although with more convenient syntax. If your functions are partitioned in a strange way, you can just as easily produce spaghetti code. Same with nested if statements. You can write well structured code in Fortran 77 for example, even though most standard control structures involve a goto. Absence of a go…

What you say is correct, though I would say that bundling up common patterns in syntactic constructs has direct advantage (you don't have to look carefully to make sure it actually fits the pattern you think it fits, &c).

Re: “Mostly functional” programming does not work

#189

Earlier quoted context omitted.

Yes there are. Glitch is an approximation to Backus's "Applicative State Transition Systems". see:Backus:"Can programming be liberated from the von Neumann style?" www.thocp.net/biographies/papers/backus_turingaward_lecture.pdf Since 1980, I have applied ASTS in the development of Hard Real Time Avionics Systems Software for Military & Commercial Aircraft and Spacecraft. I have licensed this code exclusively to Aeros…

Not really. What Backus is advocating is applicative-style programming (what we know as FP today); what Glitch is advocating is anything but! Some of the code looks similar (indeed, we are inspired by FRP and earlier reactive languages like Esterel), but Glitch keeps everything in the world of explicit control flow rather than bury everything in data flow.

Only skimmed, but it sounds like it's in a conceptual space near STM and lvish?

Re: “Mostly functional” programming does not work

#190
post #128

Seems about spot on. I find it interesting that he's now advocating monads considering his earlier stance on static type systems[0]. Of course it may just be that he's changed his mind -- it happens. (Yes, I consider monads as fundamentally requiring a static type system, at least if you're using monad transformers or similar advanced techniques. In practice you're not going to be able to get things right without com…

If "in practice, you're not going to be able to get things right..." than what the hell? That just strikes me as crazy. Note that I am not necessarily against monads. However, this idea that they are both a good answer and require fairly extensive programmatic help seem counter. I realize we can never reduce programs to things which are trivial and easy to comprehend. However, any new paradigm/trick that will always…

Any kind of static typing (regardless of how primitive) is compiler assistance. Do you think that all static typing is worthless?
Post reply on HN