Jump to content
Science Forums

Recommended Posts

Posted

How many members here have any experience with functional programming languages?

--e.g. Haskell, Meta, Erlang.

I would like to discuss (if possible) where this "discipline" is these days, and if anyone who has used them sees any problems with the current batch, etc. ( I can remember using Haskell, and being able to get the same result different ways, which is ok, but also different results, when copying an example -like from my marked exam paper which was supposed to be a correct answer from the marker -some "right" answers would only give a run-time error).

I haven't been near lambda calculus for years, so can anyone cast any light on how this is developing, and what the new crop of languages is like?

Posted

oh, as to where functional languages stand today, most AI developement is done in Lisp, so functional languages still have their applications. I guess, though, that there is not much developement done to create new functional languages or improve on the old ones.... like imagine object orientation in a functional language.... it could get crazy :)

Posted

List or stack-based functional languages are probably better suited to a parallel computing architecture, perhaps. Since a list can become a graph, of sorts. I wonder if that sort of an algebra (a randomly connected graph) is possible to encode, or how natural a fit it would be to any architecture. Networks of computers aren't really a random setup. Lisp can have lists of lists, and so on, but that's a tree-type of graph, a connected graph isn't divergent.

Does anyone have a clue what I'm talking about?

Posted

I think it would be useful to start off with a discussion of how to define "functional programming". My personal experience is that the strict definition (no state information), either limits the usefulness of the language to solving mathematical equations (APL, Mathematica), or the language has sprouted constructs that make it full of state information (Lisp).

 

According to my understanding of the definition, as soon as you introduce flow of control, its no longer a "functional language."

 

There's an entirely separate discussion we could have about parallel computing, but if we use this stricter definition of parallel, I don't see how functional programming languages are very helpful, seeing as how to make parallel computing work you need to have well defined rules for synchronization of procedural modules.

 

I've done a lot of programming in Lisp (I wrote a C compiler in it!), and apparently XSLT--which I'm working with heavily right now--is considered "functional" although I think it proves my point about functional languages being limited!

 

There is no passion like that of a functionary for his function, :snow:

Buffy

Posted

I've used Haskell and Meta, back when they were still fairly new (and still fairly buggy). I have used Lisp a bit, the thing I recall about functional languages is that you do need to allow some sort of control structure, iteration and loops are important, but conceptually any algorithm can be written without doing this, so having these extra features is more for convenience (and it makes code a bit easier to read sometimes).

 

Lambda calculus is what is supposed to set the rules for such list-based or stack-based languages. I'm just wondering what the CS guys have been thinking about regarding what might be ahead, with the advent of quantum information processing. If the chip-makers can put something together that can harness thousands of entangled states, and have memory that is effectively holographic and with zero access time, I would say there will probably be a bit of adjustment coming, to the processing paradigms we are using now. It's still really a bit of a guess when the first commercial system will be unveiled, but it seems to be inevitable (barring some unseen problem). Processing is happening in labs now, though.

 

For example, a sorting algorithm was 'arranged' on a lab setup with lasers which had the answer without running the "program" (if it had run, the answer would not have been available). You may have heard about this. These new devices, which could be less than ten years away, will make the current architectures look pretty pedestrian, I think.

 

The potential revolution, not just in how to use quantum information, but what information itself is, will possibly change our view of reality altogether (except it will be like Relativity -most people won't get it for say a century maybe). There will certainly be a need for new kinds of languages, especially those that work well in a parallel sense. I thought functional languages (e.g. Erlang) might be a promising place to start (I don't think a massively parallel quantum processor lends itself well to the current models). Haven't found much about this so far. Quantum logic is quite different to Boolean.

 

So I'm asking around about what others have to think about what's up ahead, and how we're going to handle it, sort of thing.

Posted
I've done a lot of programming in Lisp (I wrote a C compiler in it!)

That seems a bit counterintuitive, but hey, if that's what you needed to do, then that's what you needed to do.... but can i inquire as to why you wrote a compiler for a language that Lisp compiler is generally written in, in Lisp? (just out of curiosity)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...