Functional Programming Languages as Free Speech? 11
timster asks: "Okay, we've talked about functional programming languages (see Haskell for an example) here before, and I got to wondering. A procedural program is a set of statements of things to *do*, and so has an obvious "machine" aspect to it. A purely functional program, however, can be viewed as a single mathematical *expression*, which accomplishes its "purpose" through the mechanism of being evaluated. My question is: if DeCSS were written functionally, would its First Amendment protections be stronger?"
No Help, but a similar idea (Score:1)
Re:Windows 98 (Functional) Source Code (Score:1)
Re:No difference (Score:1)
Re:No Help, but a similar idea (Score:1)
Windows 98 (Functional) Source Code (Score:1)
Grind HD for a while
Crash
Repeat
Express != Implement (Score:2)
Implementative power is what you can do with a program written in the language, once it's finished; if you're to produce closed-source stuff, that's the only thing you're interested in, and that's why people have been brainwashed by forty years of closed source into not caring about more than it. The language could be "write-only", and "write-once", implementative power wouldn't be less.
Expressive power is the information you can exchange using the language with other people with whom you work. When programming is an incremental undertaking, what you care about is expressive power. That's what people need in the world of free software computing. To be very expressive, the language must be "read-write" and "write-indefinitely".
For instance, a language to describe finite state machines operating on an indefinite tape (Turing Machines) can implement any one-shot computations from integers to integers in asymptotically optimal space and time. But as a tool for interprogrammer communication, it is not nearly as expressive as Cayenne [chalmers.se] that allows to describe arbitrary functions from arbitrary higher-order types to any other, including the ability to define statically enforced logical invariants. In Cayenne (which compiles into Haskell, which can be compiled into machine code, bypassing C for everything but for system interface and runtime support), you can define a type whose elements are precisely all sort functions, excluding any buggy function that sometimes fail. The language can thus express much more than C or any other implemented language, for that matter.
-- Faré @ TUNES [tunes.org].org
Re:No difference (Score:2)
I know the difference between scheme and Haskell, but I recall that my scheme code had no defs or setfs so I was using it in a purely functional method.
Re:No difference (Score:2)
Actually cryptography is a pretty nice in a pure functional language. I've implemented a toy RSA encryption package (it differed from a real packaage in that it encrypted the entire message using the public key) in scheme and it was fairly straightforward. It took less than roughly 300 lines of code to implement key-generation, and encryption/decryption routines.
A better example of a problem area for a FP might be something like a word processor or a spread sheet but that may not be so difficult (I don't think anyone's tried it).
yes. (Score:2)
RTFjudgement (Score:2)
You're sloving a non-problem here.
No difference (Score:4)
So, even if the US law people are ignorant enough to consider an algorithm's description in English as protected speech while that same algorithm's implementation in an actual programming language is outlawed (which wouldn't surprise me, coming from a country where there were export restrictions on the PGP sources in digital form but it was OK to print and publish worldwide a book containing nothing but these same sources in printed form), I don't think that it'd make a whole lot of a difference for the people who make these decisions whether the language used in the implementation is statement- or expression-oriented. Even if it does, however mildly, look like mathematical notation.
(Hrrrm. Wonder if the new language on which I'm working, whose concrete syntax translates to and from AMS-TeX and therefore can be typeset indistinguishably from actual math, would be an advantage, then.)