Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 12/24/19 in all areas

  1. You're quite brave to say such insulting words as ".net" here on Delphi forum 😄
  2. I wish you all Happy Holidays & Merry Christmas! François Piette
  3. David Hoyle

    How to close Messages window automatically

    Yes, should be, I just haven't got around to updating as I don't need to use it any more with large monitors. You will need to create a Rio project (copy and paste) update the the CompilerDefinitions.inc file with Rio compiler information.
  4. Martin Wienold

    Best practices for handling a Stalled thread

    The difference is that terminating a process does not affect your current process from which you are calling the termination. Terminating a thread has the posibility to do just that, it may corrupt the process memory you are running it in. (This heavily depends on what is going on in the thread you are terminating and your gues is as good as mine) As this thread asked for best practice for what to do with a stalled thread: Do nothing, let it finish or try to build in a way for it to eventually finish without terminating it. If this is not a possibility and you just have to have a way to end it forcefully, let it run in a different process, isolated from your own.
  5. aehimself

    Open Url From Current Line

    There you go, I found it: https://dictionary.cambridge.org/us/dictionary/english/sarcasm I'll try to act like an adult and stop this discussion right here. If you would like to learn more about coding styles, Google is - as always - your friend. In the mean time, please learn how not to get offended when people say their favorite color is not the same as yours.
  6. aehimself

    Open Url From Current Line

    I'm no expert, but I'd say it's... nesting, which is... unnecessary? 😐
  7. aehimself

    Open Url From Current Line

    No, it's not. @Anders Melander said: "It's based on the experience that unnecessary nesting makes the code harder to read." which is not false and not an assumption. It's a general statement. I only can quote myself. Don't get offended. We are talking about personal preferences here.
  8. aehimself

    Open Url From Current Line

    There's always a connection. It's not spaghetti, it's tentacle code!
  9. Anders Melander

    Open Url From Current Line

    Code style to tentacles in three posts. I didn't see that coming.
  10. dummzeuch

    Open Url From Current Line

    Science Fiction 😉 SCNR
  11. David Heffernan

    Open Url From Current Line

    I doub you'll find a single book written in the past 25 years that would advocate nesting over early return. All the most respected experts agree on this and have done for years. Which books are you reading?
  12. Anders Melander

    Open Url From Current Line

    That's a strange question. It's based on the experience that unnecessary nesting makes the code harder to read. Sure it's a personal preference, some like it, some don't (just google Early Return - I'm sure you will find one or two that doesn't advocate it), but at least one of your "if" blocks are complete superfluous and would be removed by the optimizer if it was worth anything. What's the relevance? Are you saying that because some simple rule based validator doesn't flag your code then it can't be improved? - Because I can spot several goofs in it.
  13. Anders Melander

    Open Url From Current Line

    It's a refactoring; It improves the readability of the code without changing the functionality.
  14. Anders Melander

    Open Url From Current Line

    Nice. But: Early Return ... if ParamCount < 2 then Exit; if not FileExists(ParamStr(1)) then Exit; if not System.SysUtils.TryStrToInt(ParamStr(2), ThisLine) then Exit; ...
  15. PeterPanettone

    Open Url From Current Line

    That's the proof, thank you: There is no such thing as "unnecessary nesting"!
  16. PeterPanettone

    Open Url From Current Line

    I have found a new DEFINITION of "Early Return": "STUPIDITY TRYING TO LOOK SMART"
  17. PeterPanettone

    Open Url From Current Line

    That's not an "experience" but a FALSE ASSUMPTION (like e.g. climate change caused by cow farts).
  18. PeterPanettone

    Open Url From Current Line

    I too, if they are LOGICAL. But the above are not.
  19. PeterPanettone

    Open Url From Current Line

    Nesting shows the BEAUTY OF LOGIC.
  20. PeterPanettone

    Open Url From Current Line

    IMO it complicates the readability. But that's a personal view. Did you get this from a book or is this your own idea? BTW, Pascal Expert found 0 issues:
×