Jump to content


Popular Content

Showing content with the highest reputation on 02/19/20 in Posts

  1. I was recently asked what it might take to move off of a solid, stable Delphi-based platform and replace it with something written in, say, C# and all of the latest wiz-bang frameworks that Microsoft supports. I've seen plenty of such efforts in the past 20+ years, and not a single one of them came in anywhere near time or budget! Yet management remained committed to pouring in exorbitant amounts just to ditch a well-functioning platform written in Delphi. I don't get this. My experience over the past 15 years is that upper management loathes allowing devs to refactor code. "Cleaning up code" is what it's frequently called, and they see it as incredibly risky. While I'd tend to agree if there aren't any unit tests in place, the alternative of totally rewriting the whole thing in another language and platform with a different architecture and set of frameworks isn't my idea of "less risky". Is it just Delphi that people see as somehow incapable of continuing to work? I don't get this bias so many upper managers have against a platform that has been working reliably and relatively bug-free for YEARS.
  2. Keep in mind that I have a dict<int, int> so all I do is hash an integer - so the overhead of each gethashcode call is significant for the overall result. If I would hash like some larger data the overhead shrinks - that's what I mentioned earlier about benchmarks and comparing things ­čÖé
  3. Ugochukwu Mmaduekwe

    Get class instance in record

    Hmm, That looks like something that could work. will check it out, Thanks.
  4. Attila Kovacs

    Get class instance in record

    Not outside, as it's strict private. You could pass TA instances to the method you are using to initialize your record. class function De´╗┐faultB(ATA: TA): TB; static; begin Result.ClassAInstance := ATA; end;
  5. Der sch├Âne G├╝nther

    Get class instance in record

    By itself, TB does not really have much to do with TA. It's just a type definition, it's full type name is TA.TB. Since it's just a type definition and no instance, you could have multiple instances of TB inside your TA instance. You can have TA.TB instances outside of a TA instance. You can have a TA instance with no TA.TB inside at all.
  6. I have to admit that there are parts of our Delphi code that I want to move to .NET Core and C# - mostly because that makes it far easier to integrate it with other solutions we have on the MS platforms. That said - doing end-user applications for Windows in C# is nearly unthinkable.
  7. Whenever i am tootally stressed, i refactor all my to-do-lists. A process including a ball-point pen and some leaflets. No IDE's. I'm not sure it helps, but it makes me a bit less stressed.