Timeline for Can "higher order function" feature allow/maintain abstraction and encapsulation?
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 17, 2015 at 20:38 | comment | added | Doval | @overexchange Sorry, but language/technology choice is a complicated affair, web technologies even more so. The comments section isn't really a place for lengthy discussion, and this is getting too long already. You'll have to do research and decide for yourself. | |
Feb 17, 2015 at 20:28 | comment | added | overexchange | Doval, what about webclint language JavaScript? Is it a good choice to do functional programming paradigm? Because I need to get into web dev world.frontendmasters teach hardcore functional programming using JavaScript. | |
Feb 17, 2015 at 17:32 | comment | added | Doval |
@itsbruce I don't think I can recommend Lua to him. While it does have proper tail calls, its lambdas are even more verbose than Python's (function(x) ... ) and it makes other very dubious design choices: 1) indexes start at 1 instead of 0 ; 2) accessing an undefined variable doesn't raise an error; 3) variables are global by default (you need to add the local keyword); 4) everything is a mutable table, and attempting to make them immutable requires some hackery. The standard library is also very small and there's a lot of wheel-reinventing; not exactly the stuff big software is made of.
|
|
Feb 17, 2015 at 13:08 | comment | added | itsbruce | @overexchange Python has acquired a few functional features but Guido is hostile to any attempt to make Python a functional language. He doesn't believe that the functional paradigm suits Python. Hence the lambda support being crippled. If you want a scripting language with much better fp, consider Lua (Pythonistas often find it friendly). If dynamic is your main thing, look at Erlang. But Python will waste your time on this. | |
Feb 17, 2015 at 12:39 | comment | added | Doval | @overexchange The caller doesn't need to know implementation details. It only needs to know about the return value. You're going to run into problems using Python for FP regardless; it doesn't have proper tail calls so you risk running out of stack, and its syntax for lambdas is verbose. I would argue that dynamic typing is not fit for big software either. I think you're looking at the wrong language for the kinds of programs you want to write. Something like Haskell or F# would be better suited to your needs. | |
Feb 17, 2015 at 8:47 | comment | added | overexchange | Problem is, As a python FP programming beginner, If I start practising function currying to resolve homework problems, Will I face issues at advance level in writing big software? As a Java OOP programming beginner, Java allows programming to return instance of a class that maintain abstraction/encapsulation. | |
Feb 17, 2015 at 8:42 | comment | added | overexchange |
For your point: you can make use of the in-between functions . Do you think the user of repeat has to know the implementation details of repeat , to make use of partially applied functions(PAF) returned by repeat(square,2) ? Having advantages of PAF is different aspect(map(repeat(square, 2), numbers) ).
|
|
Feb 16, 2015 at 13:19 | history | edited | Doval | CC BY-SA 3.0 |
Typo (much -> muck)
|
Feb 16, 2015 at 13:09 | history | edited | Doval | CC BY-SA 3.0 |
deleted 34 characters in body
|
Feb 16, 2015 at 13:03 | history | answered | Doval | CC BY-SA 3.0 |