[fpc-pascal] compile time init'ing records
hnb.code at gmail.com
Fri Apr 13 12:31:41 CEST 2018
2018-04-13 11:54 GMT+02:00 Ryan Joseph <ryan at thealchemistguild.com>:
> These are great and one of the best features to be added in a while but
> that’s not the same. I mean a default constructor like Create() which the
> compiler automatically generates and takes as parameters the fields of the
> record. Making the same boiler plate constructors for records all the time
> is not so great.
> rec: TPoint;
> rec := TPoint(x: 100, y: 100);
Yes you are right. IIRC someone from core team has similar vision (Sven?),
IMO good direction :). Something like this is also on my TODO list (but not
with high priority).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal