Live data from Hacker News

Don't Be Distracted by Superior Technology

prog21.dadgum.com

51–60 of 68 posts

Re: Don't Be Distracted by Superior Technology

#51
post #50

Earlier quoted context omitted.

> So you're saying Alan Turing was wrong? Nope! The Turing-completeness of Haskell and Java means they can both compute the same functions. However, there are certain things which are just not possible to express directly in some languages. Possible to compute, but not express directly. Instead of Java, consider Brainfuck. It's a turing-complete language and certainly has no notion of what a function is. There's simp…

Java can produce any result that Haskell can produce. End of story, full stop. All non-broken computer languages are Turing machines. This is not to suggest that someone would want to use Java for anything sufficiently sophisticated, unless one is a masochist, but then, that wasn't your claim. > As far as I'm aware in Java, there's no way to write a function with a signature that says "Take two numeric arguments of a…

> Java can produce any result that Haskell can produce. End of story, full stop.

Yes, I'm not disputing this- I'm fully in agreement that all turing-complete languages can compute all turing-computable computations. I've never been trying to argue against that. I'm sorry if I haven't explained myself clearly enough- let me give it another shot.

In Haskell, I can write a function operating on numbers like this:

    f x = x**2 + x + 1
The AD library means I can do this:

    g = diff f
and g will behave as if I'd declared

    g x = 2 * x + 1
As far as I'm aware, it's not possible to write this code in Java- you can't get the differentiated version of a Java function this way.

You can compute the same results, of course. You just can't write a library that will accept a function and give back its differentiation.

You can write a function that takes some representation of a mathematical function, for example as a string, and build a function from that to compute the same results, but you can't pass in an actual Java function- so you can't write the library. You can write a library which differentiates string-representations-of-functions, but you can't write one that differentiates first-class-Java-functions (well, objects with functions on, but you get the idea. I hope.)

Re: Don't Be Distracted by Superior Technology

#52
post #50

Earlier quoted context omitted.

> So you're saying Alan Turing was wrong? Nope! The Turing-completeness of Haskell and Java means they can both compute the same functions. However, there are certain things which are just not possible to express directly in some languages. Possible to compute, but not express directly. Instead of Java, consider Brainfuck. It's a turing-complete language and certainly has no notion of what a function is. There's simp…

Java can produce any result that Haskell can produce. End of story, full stop. All non-broken computer languages are Turing machines. This is not to suggest that someone would want to use Java for anything sufficiently sophisticated, unless one is a masochist, but then, that wasn't your claim. > As far as I'm aware in Java, there's no way to write a function with a signature that says "Take two numeric arguments of a…

> Java can produce any result that Haskell can produce. End of story, full stop.

But can average Java programmers produce any result that average Haskell programmers can produce? I'd bet they can't. Haskell programmers are self-selecting: if you can grasp Haskell and be productive in it then you are an elite programmer. Not so if you can grasp Java.

Re: Don't Be Distracted by Superior Technology

#53
post #52
post #50

Earlier quoted context omitted.

Java can produce any result that Haskell can produce. End of story, full stop. All non-broken computer languages are Turing machines. This is not to suggest that someone would want to use Java for anything sufficiently sophisticated, unless one is a masochist, but then, that wasn't your claim. > As far as I'm aware in Java, there's no way to write a function with a signature that says "Take two numeric arguments of a…

> Java can produce any result that Haskell can produce. End of story, full stop. But can average Java programmers produce any result that average Haskell programmers can produce? I'd bet they can't. Haskell programmers are self-selecting: if you can grasp Haskell and be productive in it then you are an elite programmer. Not so if you can grasp Java.

This isn't really relevant to the thread of discussion.

Re: Don't Be Distracted by Superior Technology

#54

I’m not a programmer but have witnessed – and mediated - a lot of these arguments. Some are very esoteric while others are pretty practical. But some programmers forget that when you’re trying to implement a “large” project (relatively large user base and relatively long expected life), the programming language is just a tool. You can tinker forever with a technologically superior language – and enjoy the intellectua…

> the programming language is just a tool

Not really.

> I’m not a programmer

That says it all.

Talented programmers prefer to work with tools they feel productive with. While it is true that inexperienced programmers lack pragmatism when it comes to choosing their tools, it is likewise true that non-programmers who think about themselves as pragmatic are often just clueless. Hopefully you don't manage people, because you don't understand them.

Re: Don't Be Distracted by Superior Technology

#55

Earlier quoted context omitted.

Or you could implement the project in the superior language in a reasonable amount of time.

Of course, this the preferred option. But when the arguments ensue, it's usually because the developers are saying I can't give you the project in the superior language in a reasonable amount of time. So if a choice must be made between superior language and reasonable amount of time, project managers usually choose reasonable amount of time.

> So if a choice must be made between superior language and reasonable amount of time, project managers usually choose reasonable amount of time.

Sure. Of course project managers usually choose deadlines over people, then when talented people burn out and leave, they wonder why talents are so difficult to keep. We know what the safe choice is: hire average programmers who see programming languages as interchangeable, and are themselves interchangeable. No worries about competitors, for they are doing the same. Nothing wrong with that, but please let's not pretend things are any different.

Re: Don't Be Distracted by Superior Technology

#56
post #47

Earlier quoted context omitted.

> There are many libraries in Haskell which aren't even possible to write in Java (automatic differentiation, parser combinators, lenses, etc.) So you're saying Alan Turing was wrong? Publish your finding, win a Nobel Prize. You didn't say it would be difficult, you said it wasn't possible. Here's the breakdown: 1. Haskell is compiled into machine code. 2. Machine code doesn't care or reveal where it came from. 3. Po…

> So you're saying Alan Turing was wrong? Nope! The Turing-completeness of Haskell and Java means they can both compute the same functions. However, there are certain things which are just not possible to express directly in some languages. Possible to compute, but not express directly. Instead of Java, consider Brainfuck. It's a turing-complete language and certainly has no notion of what a function is. There's simp…

> This isn't really relevant to the thread of discussion.

It was, before I got carried away: I was going to say that Turing-completeness does not translate to practice. And whoever chooses a language according to its Turing-completeness is missing the big picture.

Re: Don't Be Distracted by Superior Technology

#57
post #56

Earlier quoted context omitted.

> So you're saying Alan Turing was wrong? Nope! The Turing-completeness of Haskell and Java means they can both compute the same functions. However, there are certain things which are just not possible to express directly in some languages. Possible to compute, but not express directly. Instead of Java, consider Brainfuck. It's a turing-complete language and certainly has no notion of what a function is. There's simp…

> This isn't really relevant to the thread of discussion. It was, before I got carried away: I was going to say that Turing-completeness does not translate to practice. And whoever chooses a language according to its Turing-completeness is missing the big picture.

Ah I see- sorry to've misinterpreted that! I definitely agree- brainfuck being the best example in favour of that argument :)

Re: Don't Be Distracted by Superior Technology

#58
post #47

Earlier quoted context omitted.

> you spend less time reinventing the wheel I've found this to be totally the opposite: my time in Java is much less productive. There are many libraries in Haskell which aren't even possible to write in Java (automatic differentiation, parser combinators, lenses, etc.) > very few haskell programmers that are interested in doing boring work Nobody is interested in doing boring work, or it would be interesting work. N…

> There are many libraries in Haskell which aren't even possible to write in Java (automatic differentiation, parser combinators, lenses, etc.) So you're saying Alan Turing was wrong? Publish your finding, win a Nobel Prize. You didn't say it would be difficult, you said it wasn't possible. Here's the breakdown: 1. Haskell is compiled into machine code. 2. Machine code doesn't care or reveal where it came from. 3. Po…

Turing-completeness is a red herring. All it talks about is what a machine can compute, not how. This is an important distinction because libraries can be used for things like meta-programming.

It's completely possible to have a Turing-complete method of computation that does not allow the equivalent of self-modification, for example. And then you won't be able to write a library for self-modifying code!

You can't retrofit Java with a macro system without writing a preprocessor, for example. So it is impossible to have a whole bunch of useful constructs in a library.

Essentially, as soon as you consider "self-reference"--that is, programs that depend on details of the machine itself--Turing-completeness stops mattering. And this is still important; programmers care about more than just what the program does, after all!

Re: Don't Be Distracted by Superior Technology

#59
post #50

Earlier quoted context omitted.

> So you're saying Alan Turing was wrong? Nope! The Turing-completeness of Haskell and Java means they can both compute the same functions. However, there are certain things which are just not possible to express directly in some languages. Possible to compute, but not express directly. Instead of Java, consider Brainfuck. It's a turing-complete language and certainly has no notion of what a function is. There's simp…

Java can produce any result that Haskell can produce. End of story, full stop. All non-broken computer languages are Turing machines. This is not to suggest that someone would want to use Java for anything sufficiently sophisticated, unless one is a masochist, but then, that wasn't your claim. > As far as I'm aware in Java, there's no way to write a function with a signature that says "Take two numeric arguments of a…

There are completely reasonable languages (distinctly non-broken) that are not Turing complete like Coq and Agda. You can still use them to write interesting, non-trivial programs! In fact, their limitations aren't immediately obvious--the only interesting program it's obvious they can't write is an interpreter for themselves or another programming language at least as powerful.

Re: Don't Be Distracted by Superior Technology

#60
post #58
post #47

Earlier quoted context omitted.

> There are many libraries in Haskell which aren't even possible to write in Java (automatic differentiation, parser combinators, lenses, etc.) So you're saying Alan Turing was wrong? Publish your finding, win a Nobel Prize. You didn't say it would be difficult, you said it wasn't possible. Here's the breakdown: 1. Haskell is compiled into machine code. 2. Machine code doesn't care or reveal where it came from. 3. Po…

Turing-completeness is a red herring. All it talks about is what a machine can compute, not how . This is an important distinction because libraries can be used for things like meta-programming. It's completely possible to have a Turing-complete method of computation that does not allow the equivalent of self-modification, for example. And then you won't be able to write a library for self-modifying code! You can't r…

> Turing-completeness is a red herring.

No, as a matter of fact, it's the point. A Turing-complete system can compute anything that any other Turing-complete system can.

> It's completely possible to have a Turing-complete method of computation that does not allow the equivalent of self-modification ...

Speaking of red herrings?

Post reply on HN