Menu Sign In Contact FAQ
Banner
Welcome to our forums

Programming languages

Actually C++ performance is generally BETTER than assembler, assuming you write decent code in the first place. The compiler can generate code that you would fire someone for if the assembler was the actual source, because it is incomprehensible and unsupportable. My day job is a very high performance networking system, written entirely in C++ (well, the performance critical parts). I often look at the assembler output (.s) from the compiler and… see what I said above.

You can write code that looks like it will be a performance nightmare, and the compiler turns it into a straight line of perfect instructions, with the great advantage that you can understand and maintain the source code.

There is still, even now, an idea that C++ isn’t “good enough” for embedded software. This is nonsense, there is nothing about C++ that makes it “lower performance” than C. But don’t get me going.

It’s easy to write quickly in Python (and we use it quite a bit in our system) but unfortunately all Python programs become totally unmaintainable because of the lack of compile time type checking.

The problem with more exotic languages – Rust (quite fashionable right now), Kotlin (which I quite like as a type-safe alternative to Python), Go and all the rest – is that you have to find people who know them. Good luck with that. Personally I think once you know a few languages bolting on another one isn’t that hard (as long as it isn’t some kind of silly academic exotica like Erlang or Lisp). But lots of people don’t see things that way. I currently have an issue with someone on my team who is resolutely opposed to using C++ because he considers himself a C programmer and doesn’t think he can make the transition. Honest.

LFMD, France

Peter wrote:

Formal methods are limited to trivial software functionality.

You’re wrong. (Which is shown by the fact that FM is extensively used in the development of processors.) But maybe there’s not much point in discussing this.

Perhaps the drift of what I am saying is influenced by who is paying. If I am paying, I want a solid product which can be maintained for many years (industrial electronics; long product life) and I want it in a language which won’t become a fad which only a few 1k/day people can practice 10 years from now. This points firmly to C.

You really believe that Klarna, Spotify and Siemens Transportation Systems are not interested in solid products that can be maintained for many years?

Last Edited by Airborne_Again at 27 Jun 11:28
ESKC (Uppsala/Sundbro), Sweden

johnh wrote:

Actually C++ performance is generally BETTER than assembler, assuming you write decent code in the first place.

Indeed, and that is true not only of C++ but of many (compiled) high-level languages.

some kind of silly academic exotica like Erlang or Lisp)

Erlang was developed by Ericsson which, as far as I know, is not an academic institution but rather one of the world’s leading manufacturers of telecom equipment.

I find it a bit hard to take you seriously when you say that software running many thousands of mobile and landline phone exchanges in all parts of the world are “silly academic exotica.”

Last Edited by Airborne_Again at 27 Jun 11:28
ESKC (Uppsala/Sundbro), Sweden

johnh wrote:

The problem with more exotic languages – Rust (quite fashionable right now), Kotlin (which I quite like as a type-safe alternative to Python), Go and all the rest – is that you have to find people who know them. Good luck with that.

Actually I quite successfully ran a large (~50) team of Scala developers, which is an incredibly dense language with a large learning curve if you write it using proper idiomatic technique and not just terse Java. We just tailored our interview process to language agnostic concepts and good engineering skill, combined with ability and interest to learn new things quickly. It was a successful project, and it enabled later adaptation to other skills/tools/languages. But it’s very difficult to start with a group of people who have their identity tied to a specific language/platform/toolset, and transition them to something new.

EHRD, Netherlands

Airborne_Again wrote:

software running many thousands of mobile and landline phone exchanges in all parts of the world are “silly academic exotica.”

Not just phone exchanges, but things like RabbitMQ (which we’ve been using for years, and is absolutely rock solid).

Andreas IOM

OK, I confess I confused Erlang with Haskell. There are just so many languages out there! I find it completely amazing how many new languages appear, and even flourish for a while before being overtaken by another fashionable butterfly.

Erlang is a bit of a special case, because Ericsson has embraced it so thoroughly. A bit like Coral 66 back in its day, and the UK MOD.

I’m impressed that it was possible to build a large team of competent Scala developers. Even with C++, my experience is that you get a lot more C programmers who can kind-of write C++, but for the most part do it as if it was C, than “proper” C++ programmers.

LFMD, France

Actually C++ performance is generally BETTER than assembler

Only if one has very little understanding of the hardware, and same for assembler technique.

A compiler can never outperform a human who knows what he is doing. Very esoteric optimisations excepted but they often bite you in the bum.

As for languages generally, there is a direct relationship with who is paying, like I said earlier And a lot of these projects will be hard to maintain in years to come… which again depends on who is paying

So many products have been abandoned because nobody could find the money to recruit coders who could pick them up.

I once had a Coral 66 compiler, CP/M That stuff was used in the great era of military cost-plus contracts. Surprised?

Administrator
Shoreham EGKA, United Kingdom

Only if one has very little understanding of the hardware, and same for assembler technique.

A compiler can never outperform a human who knows what he is doing. Very esoteric optimisations excepted but they often bite you in the bum.

I strongly disagree with that. For myself, I have a very thorough understanding of the hardware and of assembler – when I started work assembler was he only option for systems programming. But the compiler comes up with optimisations that, as I said, I’d fire someone for if the assembler was the source code. Yes, a human COULD have come up with it, and maybe there are people who would, but you wouldn’t want to have to deal with maintenance.

It’s a bit of an academic argument because just about nobody writes assembler now, except maybe for tiny embedded microprocessors (and I’m not even sure about that – even the Arduino is programmed in C++). The last time I wrote more than tiny scraps of it was in 1990, when I wrote a whole IP router in MIPS assembler. Now THAT was an adventure. I doubt that more than 5% or so of programmers/software-engineers have any clue about it. My son learned it on his university course, about 10 years ago, but has never used it since – he works in Java and Javascript (actually Typescript these days).

LFMD, France

Sure, this is why HLLs are used, but that wasn’t the question

Ultimately a large organisation eg Ericsson can force the use of any esoteric language. They are so big that a big chunk of Swedish univ output will be applying for a job there. And there will be univ v. Ericsson joint projects so the pipeline is well established.

Administrator
Shoreham EGKA, United Kingdom

johnh wrote:

Haskell. There are just so many languages out there! I find it completely amazing how many new languages appear, and even flourish for a while before being overtaken by another fashionable butterfly.

Well, Haskell has been around since 1990, so I would say it’s quite firmly established and no butterfly. it has a very precise language definition last revised in 2010. Certainly there are lots of experimental languages out there, but Haskell is not one of them. Lisp (which is also one of your silly academic esoterica) was designed in 1958.

Last Edited by Airborne_Again at 28 Jun 07:27
ESKC (Uppsala/Sundbro), Sweden
Sign in to add your message

Back to Top