A
A
Alexander Pikeev2020-09-14 21:21:08
Programming languages
Alexander Pikeev, 2020-09-14 21:21:08

What is language security?

I hope the question was asked more or less correctly. I often read that the language is "type-safe" (or just safe). What does it mean? For example, lately everyone has been comparing C++ and Rust. Rust is praised for its speed and safety (although I saw (did not read) Yandex's report that C++ is safer).

Answer the question

In order to leave comments, you need to log in

4 answer(s)
R
Roman Mirilaczvili, 2020-09-15
@Baryon

Judging by the article Fearless Defense. Memory safety in Rust is about memory safety.

Causes of security breaches:
  • saving the pointer after the memory is freed (use-after-free);
  • dereferencing a null pointer;
  • use of uninitialized memory;
  • an attempt by the program to free the same cell twice (double-free);
  • buffer overflow.

I
Ivan Shumov, 2020-09-14
@inoise

The language has no such characteristic as security in principle. Everything that is said about “security” must be clarified in what context it is being discussed. Everytime

D
Dimonchik, 2020-09-14
@dimonchik2013

type- safe or type-a safe?
you are asking about the second

V
Vasily Bannikov, 2020-09-15
@vabka

type-safe - you can use types to guarantee correct work with data (to a greater / lesser extent, depending on the language) (for example, C is more type-safe than javascript, and haskell is more type-safe than C)
Rust's safety also includes memory safety, as already mentioned by Roman Mirr in the answer above (this is provided by Rust's type system)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question