Great presentation, I'm also excited about the upcoming features. Here are some 
thoughts about the implementation details. 

CALL WORKER and CALL FORM are adding more 4D commands that take a method name 
as string. 4D does not have anything like closures or procedure pointers, so it 
introduces even more ways to break your code when you change a method name that 
is embedded somewhere as a string (or even a generated string). Don't forget 
about ON ERR CALL, New Process, and EXECUTE METHOD. It seems trivial to fix - 
just add a command, e.g. "Method name", that takes the *tokenized* method name 
and returns the method name as a string for use in any of the above commands. 
Now the design environment can really tell you where the method is referenced. 
If you agree, vote for the future request here:

http://forums.4d.fr/Post/EN/17984703/1/17984704


My second concern is that a method cannot be preemptive if it calls a 
non-preemptive command. Any any callers of that method also cannot be 
preemptive. A compile time error is generated in all cases.

This seems like an extreme limitation when it would be easy to arrange for the 
method to conditionally avoid calling the non-preemptive commands when in 
preemptive mode. Developers do this all the time for generic methods that need 
to be run in different contexts. A method that runs on the server can't show a 
user interface and it is easy to adjust the method to do something different 
when it runs on the server.

The compile time error means that separate methods for the same functionality 
will often need to be created. For example, I have a "NET_Send" method which 
can transport a blob using a plugin or HTTP Post. Assuming the HTTP Post method 
allows preemption but the plugin does not, I now have to split that into two 
separate methods. If there are hundreds of callers to the original method, now 
I have to change all of that code creating duplicate methods just so one option 
can work in preemptive mode.

Why not provide an option to get compile warnings instead of errors? Would it 
be that difficult for the compiler just to emit a runtime error if a 
non-preemptive command was called in a preemptive process?

Looking forward to v16!

John DeSoi, Ph.D.



> On Sep 5, 2016, at 4:53 PM, Cannon Smith <[email protected]> 
> wrote:
> 
> I also really enjoyed watching the video. It is a subject that I was really 
> excited about at the Summit and I appreciate the 4DMethod user group making 
> this possible.

**********************************************************************
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:[email protected]
**********************************************************************

Reply via email to