News for hackers. Stuff that matters.
Re:What are potential disadvantages of functional programming? by gizmo686 on Thursday July 27, 2017 @08:42PM (#14871038)
And if you do any serious functional programming, you will quickly learn that using these lists as a data structure is almost always a mistake. A mistake that happens to be encouraged by the language, but that is largely a historic wart of languages that are decades old at this point.
Re:What are potential disadvantages of functional programming? by lz400 on Thursday July 27, 2017 @08:59PM (#14871096)
Sure, agreed, but even if you use more sophisticated immutable structures you either accept the performance/memory trade offs or you have to fall back on mutable structures.
Re:What are potential disadvantages of functional programming? by tome on Friday July 28, 2017 @06:31AM (#14873235)
But that's quite a different claim from your original one!
Re:What are potential disadvantages of functional programming? by lz400 on Friday July 28, 2017 @08:18AM (#14873660)
Maybe it helps if I explain better. I find it difficult to use immutable structures if I want certain performance characteristics. It's possible I need more training in certain techniques, but I think that's why I find it difficult, the default data structures and introductory literature seems to be too naive. And in the end, no matter what I use, there will be certain trade offs for purely immutable structures, and some stuff I just think it's easier to think about in mutable terms.
Re:What are potential disadvantages of functional programming? by tome on Friday July 28, 2017 @09:14AM (#14873986)
OK, that's a reasonable position. It is easy to read your original claim as "All real world programming requires mutable values", and that is certainly not a reasonable position.