Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 10/08/19 in Posts

  1. Stefan Glienke

    Modern C++ and Delphi

    FWIW in Delphi that fear is often caused by the fact that new features often don't work for years and are poorly designed so they affect some important aspects negatively such as compile speed or runtime performance which often you encounter way later when you already extensively use them (latest example: inline variables). Many other languages have a plethora of incredibly smart people designing things for years with enough time to thoroughly test and ensure they are zero or minimal overhead.
  2. FredS

    Add a system-menu item to all applications?

    Never heard of him 🙂
  3. Stefan Glienke

    Quick debug variables?

    Writeln is a joke compared to Pythons print. You can pass any object to print and it then depends on which methods the object implements what gets printed (see https://stackoverflow.com/q/1535327/587106) And yes, almost all library types implement such methods so you can simply pass arrays, lists or dictionaries to print and get their content printed out.
  4. You haven't told us what TPath.GetDocumentsPath returns for you in 10.2. I suppose the same as in 10.3. And I suppose the same for TPath.GetSharedDocumentsPath. Do you see any difference between 10.2 and 10.3? Because targetSdkVersion is now 28 in your manifest and you need to ask permission for what you want to do. This is an Android OS request. Nothing to do with Delphi.
  5. rvk

    Add a system-menu item to all applications?

    Yes, there are... (although I could also appreciate the comment of FredS ) I have it working here in 64 bit. Besides the INVALID_HANDLE_VALUE I mentioned earlier, you need to use the correct GetMsgProc() definition. The one now used is only valid in 32 bit. If you change it into this it worked here (both in the implementation and interface part). (although you might want to avoid a parameter named wParam because it is also a type in the Windows unit which you need, solved here with unit-prefixing)
  6. David Schwartz

    Modern C++ and Delphi

    Fair point, but it's more a matter of "when" and "where"... I began using C in 1985, learned C++ about a year later and used it heavily from 1987 thru about 2000. Delphi was released in 1995 and it replaced C++ in my daily work by 2000. I used C/C++ at the time b/c I was doing embedded real-time system programming. Work in business apps, mostly under Windows, was taking off in the 90's, and it became far easier to find Delphi work than C/C++ work. Now it's getting hard to find ANY work b/c potential employers want to see 3+ years of immediate hands-on experience with whatever tools they happen to be using. (I remember seeing an ad for a job about 6 months after Apple published their iOS API that stated "must have at least 3 years experience working in iOS".) It's possible to learn pretty much anything, but you can't magically conjure up OTJ experience for them. 🙂 The last bunch of C code I looked at was some open-source stuff that was written in a way to simulate what C++ did, but in the author's words, "to avoid the overhead that C++ imposes at run-time". So instead, you had to write tons of highly stylized code to pretend you were working with classes. The last bunch of C++ code I looked at was well over a decade old and was about as "vanilla" as you could get. It hardly even implemented any of the idioms from that famous "C++ Idioms" book. Not a whole lot of consistency across any of the class designs. There was also a Delphi gig I had around 2004 where I was asked to maintain some code written by a guy steeped in C++; it was an unbelievably large and convoluted class library in Delphi that was extremely hard to figure out even with C++ expertise. Ditto for Delphi. In fact, all of the Delphi gigs I've had in the past 10 years were all maintaining D6/D7 code. Sadly the main reason a couple of them migrated to newer versions of Delphi was because the IT people there forced them to upgrade SQL Server and they needed to upgrade some libs they used with it that were only available in newer versions of Delphi. So aside from the fact that I try to keep up with the latest Delphi features myself, it's not due to any actual employment / OTJ needs. As an aside, there was a time I was working on learning Java. It's very similar to C/C++ in my mind, and Java 8 had just been introduced. I ran into a curious problem. I'd see job reqs that just specified "Java" (no version#) and libs like Spring. When I'd inquire more deeply, I'd find out they were almost all using Java 5. I talked with a VP of software at InfusionSoft at a job fair about this and asked, "When are you moving to Java 7?" and he admitted their entire platform was based on Java 5 and they had a few guys working on Java 6, but it would be at least 2 years before they could switch because they'd have to completely rearchitect their entire platform first. Meanwhile, he said they were hiring as many Java (?) developers as fast as they could. State Farm moved their world development HQ to Phoenix and they have been hiring Java devs like crazy. All Java 5 at the time I inquired, but they don't say that in any of the job reqs I've seen. I was particularly interested in the functional aspects added to Java 7, and not one place I talked with said they're using them (or even Java 7 itself). Kind of the same way none of the Delphi projects I've worked on use Interface units for anything other than those mandated by OCX. The last place I was at, my colleagues complained about my use of functional code stuff in Delphi using a library that made it much easier. It sure did simplify the code and make it a lot easier to read, but they just weren't interested. So I'm glad to hear there are places that actually keep up with new languages features and idiomatic uses. That's not what I've encountered over the past 25 years in this field, and not for lack of trying. I've found places that use the latest versions of Delphi, for example, but almost none of the features introduced since D2010. Trying to introduce them starts pushing upstream against fears rooted in the harm refactoring can have vs. stability. Very little new code is being written, and when it does happen, they want you to follow existing coding practices so future maintainers don't have to deal with a variety of coding styles. That sort of attitude is hardly language-specific in my experience. As the old saying goes, YMMV.
  7. David Heffernan

    Modern C++ and Delphi

    Given that you weren't aware of using, it seems that you may not be fluent and experienced with C++. Are you sure you are best placed to be offering critiques of the language? Certainly my experience of using local variables in C++ differs greatly from yours. It is incredibly valuable in my experience to declare local variables at the point of use and with a narrow scope.
×