tag:blogger.com,1999:blog-8336318365940619669.post4800738881958230801..comments2024-03-01T16:50:39.029+01:00Comments on Horsdal Consult: On Functional Islands in Obejct Oriented CodeChristian Horsdalhttp://www.blogger.com/profile/07782376855026802670noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-8336318365940619669.post-36238646048931380202013-03-07T20:40:33.532+01:002013-03-07T20:40:33.532+01:00C# is not a functional language. It's an OO la...C# is not a functional language. It's an OO language with a bit of FP bolted on IMO. -Bolted on in sensible and useful way, but bolted on nonetheless. This does limit how functional the code becomes. And you're right doing functions that generate other functions gets weird in C#, although you can have delegate types as return values.<br />TBH I'm undecided on 2) - I guess in C# you could go in that direction with the dynamic expando objects. -But again I feel that easily gets weird in C#.<br />The immutability OTOH I really miss in C#. -That's one of my main take aways from working with Scala.Christian Horsdalhttps://www.blogger.com/profile/07782376855026802670noreply@blogger.comtag:blogger.com,1999:blog-8336318365940619669.post-33691054065936567802013-03-07T20:24:00.991+01:002013-03-07T20:24:00.991+01:00That seems reasonable. I've done something sim...That seems reasonable. I've done something similar with Ruby code. There are a couple of things that you might lose out on if you take this style: 1) depending on your language, you lose the chance to write function-generating functions. 2) Unless you have your classes descend from a key-value associative structure (like Hash in Ruby), you lose the ability to add arbitrary (like intermediate) data to structures. (Some people wouldn't think that a disadvantage, I know.) I suppose it's also true that you lose the security of immutability, but I'm undecided how much that matters. Brian Marickhttps://www.blogger.com/profile/16162811755905479845noreply@blogger.com