HNHacker News
TopNewBestAskShowJobs

thePunisher

-14 karma · joined May 24, 2020

submissionscomments
thePunisher··on Why C# coders should shut up about Delphi (2016)
C++ is safe if you know how to use it properly, but this does incur overhead and many people aren't willing to incur any overhead because they want the fastest raw speed available. So they usually mess around with C like constructs in their C++ programs.

Pascal OTOH is 100% safe no matter what you do because you can't access pointers directly or do pointer math or out-of-bounds array access. The pointers available in Pascal are "managed" pointers which prevent you from accessing the underlying machine hardware.

This all incurs a little overhead, but you won't find any insecure Pascal programs due to memory mismanagement.

thePunisher··on Why C# coders should shut up about Delphi (2016)
Pascal was originally an application programming language, not a systems programming language.

These days you can probably mix assembly within your Pascal code or access pointers directly with some custom language extensions, but these weren't part of the original Pascal specification.

thePunisher··on Qt 5.15 LTS
I'm very nervous about using Qt since they announced they more or less want to get rid of the free edition due to less than expected income.

And their commercial offerings are very pricey indeed ($6000 a year).

I'd recommend users to switch to wxWidgets.

thePunisher··on Why C# coders should shut up about Delphi (2016)
This blog is not an article but a rant full of half-truths and outright lies. The author doesn't realize that most C# developers have no knowledge of the history of both Pascal and C (I'm old enough to know) because they were born decades after these languages came into being.

The author also misses the point that C and C++ are systems programming languages (for developing operating systems, device drivers and low-level stuff such as compilers) and Pascal is an application programming language. C and C++ were pressed into service for developing application programming because many nerds thought it cool to have the fastest benchmark speed test result and ignored the fact that these languages are unsafe to use on a day-to-day basis. That's why C# and Java were invented.

thePunisher··on Chromium project finds that 70% of security defects are memory safety problems
It's usually a trade-off since C++ may be more time consuming and therefore most costly to write. It's also a lot harder to get bug-free because of the manual memory management.

Both Java and C# may be somewhat slower, but the maintainability and freedom from memory management issues more than makes up for this.

Any engineer worth his salt will take this into account.

thePunisher··on Chromium project finds that 70% of security defects are memory safety problems
There are quite a few areas in software where determinism is a must, such as games, real-time and systems software.
thePunisher··on Chromium project finds that 70% of security defects are memory safety problems
Both Java and C# are designed for memory-safety but not thread-safety; Rust is.

Considering many of the software problems we face have some connection to thread-safety, Rust is the way to go.

thePunisher··on Chromium project finds that 70% of security defects are memory safety problems
Rewriting a browser is a memory-safe language (such as Rust) takes years if not decades.

Case in point: Firefox. They've been rewriting parts of it in Rust for the last 6 years or so and they've only managed a little over 10%.

thePunisher··on Chromium project finds that 70% of security defects are memory safety problems
I would argue that most of the memory errors actually pertain to C programs, not C++ ones (providing they use proper encapsulation and libraries such as STL).

C is syntactically C++ being a subset of C++ and I've seen many programs which claim to be C++ but are actually programmed using C methodologies.

thePunisher··on Chromium project finds that 70% of security defects are memory safety problems
The biggest problem is we are using systems programming languages to develop applications. We need to use application programming languages to develop applications. C and C++ are systems programming languages, to be used for developing operating systems, device drivers and other low level stuff.

The problem is, we haven't had a real application programming language since the demise of Pascal / Delphi. And Java / C# have been able to pick-up some of the slack, but not nearly enough as there are still tons of software being written in unsafe languages.

← PreviousPage 3 of 3