Jump to content

David Heffernan

Members
  • Content Count

    3586
  • Joined

  • Last visited

  • Days Won

    176

Everything posted by David Heffernan

  1. David Heffernan

    How many people use Delphi?

    Yeah, but performance isn't important for 98% of Delphi programmers. (am I doing this right?)
  2. David Heffernan

    How many people use Delphi?

    This makes absolutely no sense.
  3. David Heffernan

    How many people use Delphi?

    That's absolutely fair. But I was responding this this comment. If performance isn't important to you then you can just ignore such discussions. Just as I ignore discussions on things like database programming in Delphi, because I don't don't use Delphi for that.
  4. David Heffernan

    How many people use Delphi?

    My business is based around a computationally intensive numerical finite element code. The performance of the code emitted by the compiler is very important. Why do you think otherwise?
  5. David Heffernan

    How many people use Delphi?

    I'm happy for you that delphi is fast enough for you. It does produce slow code when compared to other mainstream modern compilers. C++ is a language with many compilers. Some compilers are faster than others. So it doesn't make sense to compare delphi compilers to C++ as a whole. It's certainly the case that the fastest C++ compilers produce code that is much faster than delphi. Especially for maths. In fact for maths code it's astonishing how slow delphi is.
  6. David Heffernan

    How many people use Delphi?

    Might be cast to develop, but the code produced by the Delphi compilers is slow
  7. David Heffernan

    Python over Delphi

    What is the problem for which this is the solution?
  8. David Heffernan

    Python over Delphi

    1. More complicated. Depends on the type of code and the libraries. 2. Fair. 3. Not sure about that. 4. Definitely not universally true. Perhaps for Windows GUI components, but probably nothing else. 5. Don't agree at all. Don't you see that different tools are better in different settings? Surely everyone understands that.
  9. David Heffernan

    How many people use Delphi?

    Click on the word no
  10. David Heffernan

    How many people use Delphi?

    Kind of funny that this site returns a page with a link to the emba site which in turn is a 404. Well, actually it's a 503 but whatever. So even if delphi isn't dead, isdelphidead.com is dead. A meta death if you will.
  11. David Heffernan

    Python over Delphi

    It's broadly accurate I'd say. What you should ask is the reverse, what advantages delphi has compared to python. For what it is worth I use both delphi and python. For some tasks one is better, for some the other is better. And I use a number of other languages too. Use the the tool that matches the job. In fact my product has a python api and can also host embedded python.
  12. David Heffernan

    Create a property get of 'dict' type

    @pyscripter do you know if it's reasonable to implement the python mapping protocol on the Delphi side so that from python it looks like a Python mapping?
  13. David Heffernan

    Create a property get of 'dict' type

    Consider a large dictionary with, for sake of argument, 1 million items in it. Suppose in Python you wanted to write value = foo[name] Now if foo was actually in your Delphi code, and backed by a Delphi dictionary, do you really want to populate a new Python dict with 1 million items, then perform the lookup in Python, and then throw away that dictionary. Wouldn't it be better to just ask Delphi to perform the lookup. This is what I mean what I talk about the mapping protocol. But it's entirely possible that I have misunderstood what you actually want to do!
  14. David Heffernan

    Create a property get of 'dict' type

    Do you want to create a new instance of Python dict every time the property is called? Or aren't you looking to implement the Python mapping protocol so that Python has something that behaves like a dict, but actually just reflects the underlying Delphi object?
  15. David Heffernan

    Stop/Abort Form creation..

    What happens to an exception raised in OnCreate? EDIT: I was curious. This is what happens: procedure TCustomForm.DoCreate; begin if Assigned(FOnCreate) then try FOnCreate(Self); except if not HandleCreateException then raise; end; if fsVisible in FFormState then Visible := True; end; function TCustomForm.HandleCreateException: Boolean; begin Application.HandleException(Self); Result := True; end; So exceptions are handled by a top level handler, and then excecution continues. This feels like quite a strange design choice to me. Swallowing exceptions feels odd. You can change this behaviour by overriding the dynamic method HandleCreateException to return False. Like @dummzeuch I never use OnCreate or OnDestroy.
  16. David Heffernan

    Forms showing on multiple desktops

    MainFormOnTaskbar doesn't do anything very funny, and it doesn't make your window be a tool window.
  17. David Heffernan

    Open IDE in DPI Unaware??

    Yes, that is fair. I'm tempted to get a third monitor to run at 96dpi for that purpose!
  18. David Heffernan

    Open IDE in DPI Unaware??

    An aside, but what would be the reasons for running the IDE dpi unaware?
  19. David Heffernan

    Quite confused about how to save a project

    You mean Visual Studio? I think VS is a lot more robust and stable than RAD Studio which crashes a lot.
  20. David Heffernan

    Round

    OK, there seem to be two questions asked by @Henry Olive The first one doesn't have any mention of a database, but has code that does not compile. The second question has database but we don't know what the values are. @Henry Olive you can't get a definitive answer unless we have precise details of what the data is. One thing we can say is that floating point multiplication is correct in Delphi.
  21. David Heffernan

    Unicode weirdness

    This is fair. I looked at the first couple which are UTF-8, and then assumed they all were. But a couple of them aren't. Not implausible that the Delphi code in the OP is wrong though.
  22. David Heffernan

    Round

    Where in the question is a database mentioned?
  23. David Heffernan

    Round

    What language is this? It's not Delphi. Also, your expectation is incorrect. This is what Python says the right answer is: >>> 66.3333 * 1.5 99.49994999999998 I expect that if you showed your actual code, it would be clear what is going on.
×