Hacker News new | ask | show | jobs
by ScottBurson 2378 days ago
> It's the same result for them

Not in a security-related situation, it's not! And to a lesser extent, lack of memory safety also poses a danger of silent memory corruption. (Yes, usually the program will crash outright, but not always.) And it can be a lot harder to debug a crash when it doesn't happen until thousands of cycles after the erroneous access.

Sun and Microsoft wouldn't have built and pushed Java and C# in the first place if there hadn't been a real need for safer languages.

1 comments

> Sun and Microsoft wouldn't have built and pushed Java and C# in the first place if there hadn't been a real need for safer languages.

Excepted they were safer languages before Java and C#: Ada, Lisp, All the ML family.... And all of them never lift off.

Java and C# have been successful because they were accessible and easy to learn ( partially due to their memory model), not because they were safe.

As a parenthesis, a beautiful side effect of that has also been an entire generation of programmer that has no clue of the memory model their language use underneath, because "it's managed", because it's GC.....without even realising that their 50 Millions nested/mutual object graph will make the GC on its knees on production. With the results we all know today.

Maybe, but remember that computers were very, very slow and with small memory, so GC's overhead used to be unacceptable (Emacs == eight megabytes and constantly swapping? I've seen it)..

I think that Java came 'at the right time': when computers became fast enough that the GC overhead didn't matter (except where low latency matter).