> On May 4, 2017, at 4:27 PM, Marco van de Voort <mar...@stack.nl> wrote:
> 
> Scripting languages often already by default initialize a datatructure, and
> then such language constructs only performs additional initialization.
> 
> Pascal and similar lowlevel languages don't by default initialize them, and 
> then whole initialization is
> more logical.

It’s optional and basically just a default constructor which takes all fields 
as it’s arguments. You don’t need to call it if you don’t want. Swift is 
compiled afaik but it does way more behind the scenes than I’d like Pascal to 
do and does behave like a scripting language in many ways (inferred types for 
example). That being said Pascal records should still have a default 
constructor since this is a pattern repeated extremely frequently.

Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to