> On Dec 21, 2017, at 3:06 PM, Don Lapin via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> 4D does not seem to lend itself to the functional approach.

Completely true. Changing the database is non-functional. You could try to 
enforce this discipline, but I think it would be difficult to get real work 
done in 4D. Even if you never passed a pointer or used a process/interprocess 
variable, a method might have side effects if it changes the database or 
modifies an object parameter. Error handling in 4D is incredibly primitive 
compared to other languages and the only way to get error information is via 
side effects.


> 
> When designing something new, do you give any thought to using one or the 
> other approach? Do you force yourself to only return values to a calling 
> method? Or do these paradigms represent a distinction of no practical 
> significance?


I think making every method functional with minimal side effects is a good 
goal. But I don't think it is possible to write understandable and maintainable 
4D code using a purely functional approach.

John DeSoi, Ph.D.

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to