The Downfall of Imperative Programming

2012-04-09 Thread Mirko Pilger
i guess this might be of interest to some. http://fpcomplete.com/the-downfall-of-imperative-programming/ http://www.reddit.com/r/programming/comments/s112h/the_downfall_of_imperative_programming_functional/

Re: The Downfall of Imperative Programming

2012-04-09 Thread Gour
On Mon, 09 Apr 2012 22:28:01 +0200 Mirko Pilger wrote: > i guess this might be of interest to some. Yes, it is...and I wonder if D's FP features are good enough? Author mentions D, but says:"...This is all good, but not enough..." Sincerely, Gour -- Everyone is forced to act helplessly acc

Re: The Downfall of Imperative Programming

2012-04-09 Thread Sean Cavanaugh
On 4/9/2012 3:28 PM, Mirko Pilger wrote: i guess this might be of interest to some. http://fpcomplete.com/the-downfall-of-imperative-programming/ http://www.reddit.com/r/programming/comments/s112h/the_downfall_of_imperative_programming_functional/ I would counter a flow based programming

Re: The Downfall of Imperative Programming

2012-04-09 Thread Froglegs
I like functional languages, but the only one that seems to have much support is F#. I've used TBB Flow Graph in C++ and found it to be a major improvement over straight parallel algorithms/tasks/message passing etc which seem to be the norm(like in D). Expressing dependencies between se

Re: The Downfall of Imperative Programming

2012-04-09 Thread James Miller
* Sean Cavanaugh [2012-04-09 16:09:03 -0500]: > On 4/9/2012 3:28 PM, Mirko Pilger wrote: > >i guess this might be of interest to some. > > > >http://fpcomplete.com/the-downfall-of-imperative-programming/ > > > >http://www.reddit

Re: The Downfall of Imperative Programming

2012-04-09 Thread Marco Leise
Am Tue, 10 Apr 2012 12:50:32 +1200 schrieb James Miller : > Slightly OT: With the unstoppable march of parallel programming, does > anybody else find node.js incredibly infuriating, since it is > single-core. Don't blame the library. EcmaScript was designed to be single-core. I imagine that web

Re: The Downfall of Imperative Programming

2012-04-10 Thread Kagamin
On Monday, 9 April 2012 at 20:22:30 UTC, Mirko Pilger wrote: http://fpcomplete.com/the-downfall-of-imperative-programming/ --- All data is immutable. All functions are pure. You might think this is crazy — how can you program with such stifling restrictions? It turns out that people have been

Re: The Downfall of Imperative Programming

2012-04-10 Thread James Miller
* Marco Leise [2012-04-10 05:57:52 +0200]: > Am Tue, 10 Apr 2012 12:50:32 +1200 > schrieb James Miller : > > > Slightly OT: With the unstoppable march of parallel programming, does > > anybody else find node.js incredibly infuriating, since it is > > single-core. > > Don't blame the library. Ec

Re: The Downfall of Imperative Programming

2012-04-10 Thread Sönke.Ludwig
On Tuesday, 10 April 2012 at 10:38:28 UTC, James Miller wrote: * Marco Leise [2012-04-10 05:57:52 +0200]: Am Tue, 10 Apr 2012 12:50:32 +1200 schrieb James Miller : > Slightly OT: With the unstoppable march of parallel > programming, does > anybody else find node.js incredibly infuriating, s

Re: The Downfall of Imperative Programming

2012-04-10 Thread Paulo Pinto
No really. Scala, Clojure and Ocaml also do have quite industry support already. Actually on my job, any client would pick one of those over D, as they are slowly being accepted in enterprise projects. A curious fact is that the FP fans have much to thank to Microsoft, as it is the company with

Re: The Downfall of Imperative Programming

2012-04-10 Thread Gour
On Tue, 10 Apr 2012 18:06:37 +0200 Paulo Pinto wrote: > Scala, Clojure and Ocaml also do have quite industry support already. How does the GUI world of Ocaml look like? Sincerely, Gour -- According to the three modes of material nature and the work associated with them, the four divisions o

Re: The Downfall of Imperative Programming

2012-04-10 Thread bls
On Tuesday, 10 April 2012 at 16:30:34 UTC, Gour wrote: On Tue, 10 Apr 2012 18:06:37 +0200 Paulo Pinto wrote: Scala, Clojure and Ocaml also do have quite industry support already. How does the GUI world of Ocaml look like? Sincerely, Gour GTK

Re: The Downfall of Imperative Programming

2012-04-10 Thread Russel Winder
Two quite interesting points to make here: 1. OCaml has a GIL and so, like CPython (*), is forced to use operating system processes to obtain parallelism. Also OCaml has imperative features, it is not a pure functional language. Clojure followed this route as well, using STM to deal with locking

Re: The Downfall of Imperative Programming

2012-04-10 Thread Gour
On Tue, 10 Apr 2012 19:01:07 +0200 "bls" wrote: > GTK Then, D is better even in that regard. ;) Sincerely, Gour -- Whenever and wherever there is a decline in religious practice, O descendant of Bharata, and a predominant rise of irreligion — at that time I descend Myself. http://atmaram

Re: The Downfall of Imperative Programming

2012-04-10 Thread Paulo Pinto
Microsoft is taking a careful approach with F# in what concerns GUIs. Actually they are promoting C# or VB.NET code for the GUI part, while leaving all the business code for F#. This approach seems to cater more for the business audience, as to have the GUI also written in F#. -- Paulo On T

Re: The Downfall of Imperative Programming

2012-04-10 Thread Paulo Pinto
My favourite FP language is Haskell, but I doubt most "code monkeys" will ever be able to grasp it, while impure ones are more approachable in enterprise environments. The issues you point out are actually more implementation issues than language related, right? -- Paulo On Tuesday, 10 April 20

Re: The Downfall of Imperative Programming

2012-04-10 Thread Gour
On Tue, 10 Apr 2012 20:19:13 +0200 "Paulo Pinto" wrote: > My favourite FP language is Haskell, but I doubt most "code > monkeys" will ever be able to grasp it, while impure ones are more > approachable in enterprise environments. That's right...I tried with Haskell, liked its syntax a lot, but w

Re: The Downfall of Imperative Programming

2012-04-10 Thread Russel Winder
On Tue, 2012-04-10 at 20:46 +0200, Gour wrote: [...] > That's right...I tried with Haskell, liked its syntax a lot, but was not > sure I really grokked monads. Moreover, I lost few potential [...] The biggest problems with monads are that most imperative programmers think they are some massive hig

Re: The Downfall of Imperative Programming

2012-04-10 Thread Gour
On Tue, 10 Apr 2012 20:13:45 +0100 Russel Winder wrote: > The biggest problems with monads are that most imperative programmers > think they are some massive high magic that is incomprehensible to > mere mortals, and most functional programmers think they are simple > and that they understand th

Re: The Downfall of Imperative Programming

2012-04-10 Thread Russel Winder
On Tue, 2012-04-10 at 21:22 +0200, Gour wrote: [...] > In any case, as it is often said, I got a feeling that despite its > potential cleanliness, the real-world Haskell code was not so readable. That probably comes down to familiarity and personal taste. > By deploying some coding discipline, we

Re: The Downfall of Imperative Programming

2012-04-10 Thread Gour
On Tue, 10 Apr 2012 21:02:03 +0100 Russel Winder wrote: > Hummm... the really core issue is whether the language supports tail > call optimization. Functional programming languages demand it, C, > C++, Java, Go, Python definitely don't have it, D... Isn't it because they have to use recursion i

Re: The Downfall of Imperative Programming

2012-04-10 Thread Andrei Alexandrescu
On 4/10/12 3:02 PM, Russel Winder wrote: Hummm... the really core issue is whether the language supports tail call optimization. Functional programming languages demand it, C, C++, Java, Go, Python definitely don't have it, D... D has only the tail recursion, not the tail call. The latter shou

Re: The Downfall of Imperative Programming

2012-04-10 Thread Alex Rønne Petersen
On 10-04-2012 23:02, Andrei Alexandrescu wrote: On 4/10/12 3:02 PM, Russel Winder wrote: Hummm... the really core issue is whether the language supports tail call optimization. Functional programming languages demand it, C, C++, Java, Go, Python definitely don't have it, D... D has only the ta

Re: The Downfall of Imperative Programming

2012-04-10 Thread bearophile
Russel Winder: On the JVM the interesting question is whether Clojure finally makes Lisp a mainstream language outside of one or two domains. Clojure contains some interesting programming language design ideas. I have written enough Scheme that now I am sure I don't like to write S-expressio

Re: The Downfall of Imperative Programming

2012-04-10 Thread Dmitry Olshansky
On 11.04.2012 1:04, Alex Rønne Petersen wrote: On 10-04-2012 23:02, Andrei Alexandrescu wrote: On 4/10/12 3:02 PM, Russel Winder wrote: Hummm... the really core issue is whether the language supports tail call optimization. Functional programming languages demand it, C, C++, Java, Go, Python de

Re: The Downfall of Imperative Programming

2012-04-11 Thread Kagamin
On Tuesday, 10 April 2012 at 17:19:00 UTC, Russel Winder wrote: I am a fan of declarative expression, I prefer functional approaches over explicitly imperative ones. For the moment though using single assignment in imperative languages with all the lambda/closure technology and using functiona

Re: The Downfall of Imperative Programming

2012-04-11 Thread Caligo
The Haskell version of Romans, rubies and D: Modified version of http://www.haskell.org/haskellwiki/Roman_numerals so that it's compile time. >8>8 module Romans where import Language.Haskell.TH import Maybe roman :: String -> ExpQ roman s = retu

Re: The Downfall of Imperative Programming

2012-04-12 Thread James Miller
* Russel Winder [2012-04-10 21:02:03 +0100]: > On Tue, 2012-04-10 at 21:22 +0200, Gour wrote: > [...] > > In any case, as it is often said, I got a feeling that despite its > > potential cleanliness, the real-world Haskell code was not so readable. > > That probably comes down to familiarity and

Re: The Downfall of Imperative Programming

2012-04-12 Thread bearophile
James Miller: I wish I could love Haskell, and for pure computer science, it's fine, amazing even, but for real-world programming, it just doesn't cut it. Haskell contains some ideas worth copying even in non-functional languages (or in mixed languages as D). Enforced purity and immutabili

Re: The Downfall of Imperative Programming

2012-04-12 Thread Jeff Nowakowski
On 04/10/2012 12:06 PM, Paulo Pinto wrote: A curious fact is that the FP fans have much to thank to Microsoft, as it is the company with more FP research on their paychecks. Many open source fans are not aware that a few of the main developers in the Ocaml and Haskell communities, work for Micro

Re: The Downfall of Imperative Programming

2012-04-12 Thread Gour
On Thu, 12 Apr 2012 23:04:16 +1200 James Miller wrote: > I wish I could love Haskell, and for pure computer science, it's fine, > amazing even, but for real-world programming, it just doesn't cut it. > The concepts are too difficult and not explained well enough, code > rapidly becomes unreadable

Re: The Downfall of Imperative Programming

2012-04-12 Thread Gour
On Thu, 12 Apr 2012 15:14:37 +0200 "bearophile" wrote: > Haskell contains some ideas worth copying even in non-functional > languages (or in mixed languages as D). What do you miss in D from Haskell? Sincerely, Gour -- To deliver the pious and to annihilate the miscreants, as well as to re

Re: The Downfall of Imperative Programming

2012-04-12 Thread bearophile
Gour: What do you miss in D from Haskell? It's written a bit below in my post: lazy immutable lists, pattern matching, tuples and their various unpacking syntax, list comprehension, structural algebraic types, built-in currying and partial application I am about to write a post about one o

Re: The Downfall of Imperative Programming

2012-04-12 Thread James Miller
* bearophile [2012-04-12 15:14:37 +0200]: > James Miller: > > >I wish I could love Haskell, and for pure computer science, it's > >fine, amazing even, but for real-world programming, > >it just doesn't cut it. > > Haskell contains some ideas worth copying even in non-functional > languages (or

Re: The Downfall of Imperative Programming

2012-04-12 Thread Paulo Pinto
Well, all these guys seem to disagree with you about using Haskell in real-world programming http://corp.galois.com/ http://www.eaton.com/Eaton/index.htm http://blog.tupil.com/ -- Paulo On Thursday, 12 April 2012 at 11:04:06 UTC, James Miller wrote: * Russel Winder [2012-04-10 21:02:03 +010

Re: The Downfall of Imperative Programming

2012-04-12 Thread Paulo Pinto
On Thursday, 12 April 2012 at 13:36:41 UTC, Jeff Nowakowski wrote: On 04/10/2012 12:06 PM, Paulo Pinto wrote: A curious fact is that the FP fans have much to thank to Microsoft, as it is the company with more FP research on their paychecks. Many open source fans are not aware that a few of th

Re: The Downfall of Imperative Programming

2012-04-12 Thread H. S. Teoh
On Thu, Apr 12, 2012 at 05:02:36PM +0200, Paulo Pinto wrote: > On Thursday, 12 April 2012 at 13:36:41 UTC, Jeff Nowakowski wrote: [...] > >Microsoft has also in recent years been very aggressive with their > >patent portfolio, rattling their saber at Linux and suing Android > >distributors. > > An

Re: The Downfall of Imperative Programming

2012-04-12 Thread Jeff Nowakowski
On 04/12/2012 11:02 AM, Paulo Pinto wrote: And yet IBM still is the number one champion in patents. Or just, because they play nice most of the time with open source they are excused? I don't know why you are talking about IBM. Maybe you should reread my post. I'm talking about Microsoft bec