Project

General

Profile

Feature #11528

implement COMPILE stmt

Added by Greg Shah about 1 month ago. Updated about 1 month ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:
reviewer:
production:
No
env_name:
topics:

Related issues

Related to Conversion Tools - Feature #11355: VSCode extension New
Related to Conversion Tools - Feature #3882: changes to allow the front-end to be used for 4GL syntax checking New

History

#1 Updated by Greg Shah about 1 month ago

Although this is a 4GL language statement, possibly best considered part of Base Language, from our perspective it has always been a developer feature. As such, we had made it a low priority.

Some amount of conversion support already exists. We would need to finish that work and then implement a dynamic conversion for the runtime support.

With the coming work for IDE support (especially #11355) and syntax checking support (#3882), we should be able to implement this in a fairly straightforward way. Part of the support that needs to be implemented is ensuring that the resulting converted code can be executed immediately from the same FWD server in which we executed the COMPILE statement.

Other things it may help enable:

  1. Development Environments built using 4GL code
    • We know of cases where WebSpeed development environments exist that generate code and dynamically compile/run it.
  2. Dynamic Code Generation
    • This is something we've previously excluded from project scopes but we have seen many applications with this pattern.
    • It is easy to imagine 4GL code that writes other 4GL code to a file and then RUNs that code (implicit COMPILE in the RUN stmt) or uses COMPILE explicitly.
  3. Running From Source
    • a.k.a. Just In Time (JIT) conversion
    • Old school 4GL environments sometimes ran from a source implementation, even in production. (terrible idea but it did happen)
    • For development purposes, it can be pretty useful and is still in use for that reason.
    • It would make a POC using FWD much easier. You could just point to some source and start up a session which would compile the code on the fly and run it. As it tries to load/run other code, it would continue compiling on the fly and executing that code.

#2 Updated by Greg Shah about 1 month ago

#3 Updated by Greg Shah about 1 month ago

  • Related to Feature #3882: changes to allow the front-end to be used for 4GL syntax checking added

Also available in: Atom PDF