Page 4 of 4 FirstFirst ... 234
Results 31 to 35 of 35

Thread: New Delphi features since Delphi 7

  1. #31

    New Delphi features since Delphi 7

    Quote Originally Posted by cronodragon
    Do records with methods work in the same way as classes in C++, in the way that they are disposed automatically? :?
    I would suspect that still is the case. If the opposite you would logically have to allocate them before they worked
    Peregrinus, expectavi pedes meos in cymbalis
    Nullus norvegicorum sole urinat

  2. #32

    New Delphi features since Delphi 7

    I'm translating the book "Physically Based Rendering: From Theory to Implementation" to Delphi.

    They use classes and operator overloading to do operations. I tried using classes of Delphi, but soon found that instances are not disposed after operations, instead records do. So I have to transform everything to records, and use overloaded functions instead... and hoping I'll be able to fake inheritance when I need it later on.

    If the new Delphi (is Delphi 2007 out?) allows that functionality then I'll finally move from Delphi 7.

  3. #33

    New Delphi features since Delphi 7

    Couldn't you just use objects?

    Delphi 2005 supports traditional records extended with methods and properties
    Peregrinus, expectavi pedes meos in cymbalis
    Nullus norvegicorum sole urinat

  4. #34

    New Delphi features since Delphi 7

    records with methods are well records....the record pointer is passed as a hidden "self" parameter in every method for record you declare....so yes since they are allocated on the stack, they are disposed automaticly with function return....

  5. #35

    New Delphi features since Delphi 7

    Quote Originally Posted by cronodragon
    I'm translating the book "Physically Based Rendering: From Theory to Implementation" to Delphi.

    They use classes and operator overloading to do operations.
    I don't think so that Delphi 2007 allows classes overloading(which is not recommended) but is allowing operators overloading for sure.

    http://www.excastle.com/blog/archive...1/08/2531.aspx

    quite interesting (and one of many) summary

Page 4 of 4 FirstFirst ... 234

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •