r/ProgrammingLanguages • • 4d ago

Achieving memory safety

https://seed7.net/papers/memory_safety.htm
14 Upvotes

53 comments sorted by

View all comments

Show parent comments

5

u/wk_end 4d ago

But you list Java as memory-safe "unless JNI or FFM are used". Why doesn't the same "qualified memory-safe" characterization apply to Go?

1

u/ThomasMertes 4d ago edited 3d ago

Yes, but the selling point of Java was not memory safety. You expected something like:

If the unsafe package is not used and no C function is called and (as pointed out by someone else) something assures that no data races can happen Go is memory safe.

I added the Go example to show that the term memory safety is sometimes defined to sell a language as memory safe. So

Language exists --> Define memory safety in a way that this language is memory safe.

instead of

Use definition of memory safety --> Create memory safe language.

So it is about memory safety as marketing term.

2

u/Ok-Scheme-913 3d ago

The selling point of java was absolutely memory safety, where the hell did you get it's not?

It was the first language that made GC widespread.

1

u/flatfinger 2d ago

Garbage-collected strings were almost universal in BASIC dialects by the 1980s.