News for hackers. Stuff that matters.
Re:I want to fix programming by skizm on Tuesday January 24, 2012 @04:34PM (#3506939)
So I am relatively naive when it comes to declarative programming in general and have not yet read this paper (I will after commenting here), but that said...

Don't you have to (at the very least) tell the compiler how to do things? To reuse the example from the article: when you tell your friend to get you a beer, at some point your friend has learned HOW to get you a beer. Similarly the compiler will need to know HOW to do things that you declare. Sure it will be great when we can just tell the compiler that we need this list sorted in reverse alphabetical order but at some point someone is going to have to program the sorting algorithm on the back end.

Am I way off or are we just talking about a hypothetical future when compilers are (even more) black boxed and we don't have to think about them anymore?

Re:I want to fix programming by Tuna-Fish on Tuesday January 24, 2012 @04:41PM (#3506997)
Declarative languages are defined by the fact that in them, you don't tell the compiler how to do things. You just describe the result you want, and it's the compilers job to get there. Yes, this makes the compiler rather hard to write.

SQL is probably the primary example. Prolog is also well-known.

Re:I want to fix programming by AUmrysh on Tuesday January 24, 2012 @04:57PM (#3507074)
For anyone who may not know, Prolog does this in a pretty interesting way. You have some declarations that make up your program, Prolog takes these and then uses them to conduct a logical proof (like in discrete math). You negate the premise (proof by contradiction), and then try to show that this will cause a contradiction (line 5 says Bob is Human, but line 42 says Bob is not Human). If you can find such a contradiction, your premise was true.

It does this by using backtracking, which is really interesting in itself if you're not familiar with it.

Re:I want to fix programming by _sh on Tuesday January 24, 2012 @06:05PM (#3507421)
Also fascinating is the amazing and innovative virtual machine that drives Prolog: the Warren Abstract Machine.

See: http://wambook.sourceforge.net/