For me, it's because memories are not trustworthy (rose-colored glasses). Also, I had less experience back then. And we as an industry didn't know any better.
I got started in programming in Borland Pascal and Borland C++. Because of nostalgy, I've tried using them for fun again ten years ago and boy is there a reason I stopped using them in the first place. Sheesh.
Example OWL snippets:
for (int index = 0; index < count-1; index++) {
int len = GetStringLen(index);
TAPointer<tchar> buf(new tchar[len+1]);
GetString((tchar*)buf, index);
*outStream << (tchar*)buf << _T('\n');
//delete buf;
}
...
TClipboard cb(*this, false);
if (cb.EmptyClipboard()) {
int len = GetStringLen(index);
HANDLE cbhdl = ::GlobalAlloc(GHND,len+1);
LPTSTR buf = (LPTSTR)::GlobalLock(cbhdl);
GetString(buf, index);
::GlobalUnlock(cbhdl);
...
class tGastValid : public TEdit {
public:
tGastValid(TWindow *Win, short ID) : TEdit(Win, ID) {}
void EvKillFocus(HWND);
DECLARE_RESPONSE_TABLE(tGastValid);
};
DEFINE_RESPONSE_TABLE1(tGastValid, TEdit)
EV_WM_KILLFOCUS,
END_RESPONSE_TABLE;
void tGastValid::EvKillFocus(HWND hWnd) {
GetParentO()->SendMessage(WM_COMMAND, DB_BTGAST, 0);
TEdit::EvKillFocus(hWnd);
}
^-- I liked THAT? What was wrong with me ;)That said, Borland had really good class libraries. If I had those libraries in a modern language, hey that wouldn't be so bad. But these languages? No, thank you.
By the way, you should have a dive into how the "modern" development experience with Rust/WinRT compares with C++ Builder in 2022.
Really? I review and read a bunch of Rust code on a weekly basis from projects I might use in various contexts. I hardly ever see unsafe used, except in contexts where it is necessary like FFI.
I am pretty sure that your comment is provably false, if someone wanted to run a report on crates.io. Oh, looks like someone did, and it trends to 0: https://www.reddit.com/r/rust/comments/g0wu9b/percentage_of_...
From your link: To get this plot I ordered all crates by unsafe code % and then plotted it, so each point on the graph is unsafe code % for a single crate.
The link is still some evidence in support of your position, given that it drops off close to the left edge, i.e., a small number of crates have a large amount of unsafe code. But it isn't nearly the smackdown of GP's position you must think it to be for you to be so aggressive toward them.
I find the statements around unsafe in Rust to generally be incorrect though, from what I can tell, it’s only ever used in quite narrow cases and not generally across the vast majority of Rust software.
Not having looked at that API specifically, it might be that they think there are perhaps different approaches to implementing the safe interfaces, and those may be best left to specific implementations for UI abstraction frameworks, like Druid.
Just speculating.
I've been coding C/C++ since 1995. I'll take Rust any day, thanks.
Don't forget that to contribute to Rust backends on their present forms, some C++ is required.
I never used the C++ version OWL (though i do have Borland C++ 5 around here, perhaps i'll try it for fun at some point), but the Turbo Pascal version of OWL (which i also really used but had a brush with - and some docs) wasn't really that great - more of a helper library for the underlying Windows API, needing to know the underlying API, in practice not very different than MFC (also more of a helper library to make using Win16/Win32 easier than something to let you ignore it).
VCL was by long long far the best API/Framework (and in some ways it still is, though FCL/LCL is better since it is richer and also crossplatform).
FWIW i did a partial recreation of Turbo Pascal OWL in Free Pascal some years ago[0]. It doesn't have much of a practical use though (unless you want to make some small GUI EXE files in Free Pascal) since i think even Borland abandoned the Pascal version of OWL and i doubt many people used it.
Naturally VCL was even better, Microsoft is still trying to catch up with C++ Builder and failing spectacularly at it. C++/CX could have been it, but then the ATL/WRL folks at WinDev had to kill it.
I wonder why, doing Windows programming with OWL in 1993 was quite delightful, or Mac with AppToolbox/PowerPlant,...
Yes there is always C stuff coming throught the cracks, but I see similar aproaches with Rust code making use of unsafe when there are safe alternatives.