comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: does a safer language mean it is slower to run?
Date: Thu, 8 Jun 2023 10:00:52 +0200	[thread overview]
Message-ID: <u5s1rk$1eprk$1@dont-email.me> (raw)
In-Reply-To: <u5rjg8$1dr0c$1@dont-email.me>

On 2023-06-08 05:55, Nasser M. Abbasi wrote:
> Some folks in this thread
> 
> https://discourse.julialang.org/t/comparison-of-rust-to-julia-for-scientific-computing/78508
> 
> "I’m not an expert, but my feeling is that Rust is a “safer” language,
> which to me means it must be slower."

I think comparison is misplaced. Julia is an interpreted language, very 
slow, on par with Python. It has memory mapped arrays like Ada does, but 
lacks Python's precompiled modules. The syntax is wonderfully arbitrary 
and unpredictable...

> Some in that thread seem to argue that a safer language
> will/could be slower than otherwise.

> Since Ada is known to be one of the safest languages,
> do others here feel there is any truth to this?
> 
> I thought that by having more type information in the language,
> the compile will be able to make more optimizations (because it
> know more), and hence the generated code should actually be
> faster, not slower with a language that is less safe?
> 
> I am not a compiler expert but what do others here think?

If safety is prevention of logical errors (bugs) you and your team and 
people deploying the software could make, then techniques and processes 
determine the outcome. The language can only support certain techniques. 
Of these techniques and processes some may require run-time overhead. 
When people compare languages, they frequently do programming techniques 
instead. As it was observed many decades ago:

"Besides, the determined Real Programmer can write Fortran programs in 
any language."

And finally, if you determined to use some technique, then lack of 
language support makes the language less safe. E.g. if you are in some 
agile programming lager then semantic constraints imposed by Ada would 
make things only worse.

Even Brainf*ck might be the safest language under circumstances... (:-))

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

  parent reply	other threads:[~2023-06-08  8:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-08  3:55 does a safer language mean it is slower to run? Nasser M. Abbasi
2023-06-08  6:57 ` Niklas Holsti
2023-10-25 17:01   ` robin vowels
2023-10-25 18:33     ` Niklas Holsti
2023-11-01  1:48       ` Randy Brukardt
2023-06-08  8:00 ` Dmitry A. Kazakov [this message]
2023-06-08 22:32   ` Jerry
2023-06-10 12:33     ` Gautier write-only address
2023-06-08  8:50 ` Jeffrey R.Carter
2023-06-08 15:19 ` Luke A. Guest
2023-08-03 20:42   ` Kevin Chadwick
2023-09-29 19:23 ` Shark8
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox