Another feature suggestion
Posted: 13 Feb 2023 17:28
After having explored PropertyDepot ideas, it seems that a nice feature for VP would be a compiler directive that could automatically insert the property getters and setters into the implementation file.
That would make a database of properties less important.
Maybe something like this:
That would make a database of properties less important.
Maybe something like this:
Code: Select all
interface myClass
properties [autoProperty] % automatic code appended to myClass.pro
tally : integer := 0. % count of everything
total : real. % sum of everything
properties % no code generation
textColor : ::color.
bgColor : ::color.
centerText : boolean.
end interface myClass
Code: Select all
Implement myClass
...
% This PROPERTY code is maintained automatically, do not update it manually.
% 11:56:28-10.2.2023
facts % for autoProperties
...
clauses % for autoProperties
...
% end of automatic PROPERTY code
end implement myClass