The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages - More
> Other Programming Languages
|
Page 3 -
Why learn OCaml?
Page 3 - Discuss Why learn OCaml? in the Other Programming Languages forum on Dev Shed. Why learn OCaml? A place for discussing programming languages not covered in specific forums such as Assembler, COBOL, etc. - you get the idea.
|
|
 |
|
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

September 3rd, 2006, 06:37 AM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
Quote: | Originally Posted by jamieB I think LINQ does derive directly from applicative notions...see Meijer on LtU - http://lambda-the-ultimate.org/node/967 . Re bolt-ons to languages like C#, higher order programming is a very powerful abstraction that can make code easier to write, read and debug (this classic is still relevant - http://www.cs.chalmers.se/~rjmh/Papers/whyfp.html) so if it becomes available in an environment that didn't support it before, that's good news isn't it? |
Like I said, I'm not an expert with regards to LINQ. I haven't spent all that much time with it as of yet but having equivalents to map, filter, reduce etc. doesn't to my mind make the language directly related to applicative programming  .
I agree that yes adding things like higher-order programming would are wonderfully powerful, but I'll add: if done well.
Adding classes and templates to C can be seen as a good idea and was probably regarded as a step forward but the resulting language is terribly inconsistent.
If the developers of C# can add useful abstractions like this without producing a mess then I take my hat off to them  .
Some of the best language designers to date have tried this and to the best of my knowledge it isn't going so well  .
Mark.
__________________
programming language development: www.netytan.com – Hula
|

September 3rd, 2006, 04:10 PM
|
 |
fork while true;
|
|
Join Date: May 2005
Location: England, UK
|
|
|
Actually, something I ran into in my short days with .net indicates there are already anonymous functions, named delegates. They're typically used for events it would appear.
|

September 3rd, 2006, 10:41 PM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
Quote: | Originally Posted by LinuxPenguin Actually, something I ran into in my short days with .net indicates there are already anonymous functions, named delegates. They're typically used for events it would appear. |
Morning LP,
We're not talking about .NET, we're talking about the adoption of paradigms into languages not designed for them and the results on the languages semantics as entropy increases.
.NET may well have these things (they're certainly available in F# and others).
I personally don't know if C# 2.0 supports these things; I know that version 1.0 didn't, but version 3.0 will.
Mark.
|

September 3rd, 2006, 10:49 PM
|
 |
fork while true;
|
|
Join Date: May 2005
Location: England, UK
|
|
|
I'm talking about c# 2.0. I had to write some obscure event sub and had to use a delegate for it which appeared to be equivalent to a lambda. far messier though.
|

September 3rd, 2006, 11:08 PM
|
|
|
Quote: | Originally Posted by LinuxPenguin I'm talking about c# 2.0. I had to write some obscure event sub and had to use a delegate for it which appeared to be equivalent to a lambda. far messier though. |
The closest equivalent to a delegate is a function pointer. Not quite a lambda.
|

September 4th, 2006, 01:30 AM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
A delegate is like a lambda? So far as I understand the delegation design pattern I can't see how you could come to that conclusion  .
Maybe C# has some kind of twisted semantics for this, I'll find out over the next year.
Edit: even after researching a while I can't see it, delegates just aren't like anonymous functions.
http://en.wikipedia.org/wiki/Delegation_(programming)
Mark.
Last edited by netytan : September 4th, 2006 at 03:49 AM.
|

September 4th, 2006, 12:03 PM
|
 |
Contributing User
|
|
Join Date: Dec 2004
Location: Meriden, Connecticut
|
|
Wikipedia
C# 3.0 will have lambda expressions.
From the above link:
"Anonymous delegates providing closure functionality."
Doesn't sound like lambda to me...
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|