Live data from Hacker News

Some Were Meant for C: The Endurance of an Unmanageable Language [pdf]

cl.cam.ac.uk

251–253 of 253 posts

Re: Some Were Meant for C: The Endurance of an Unmanageable Language [pdf]

#251

Earlier quoted context omitted.

> The point is, C++ allows composing these containers making higher-level ones, such as this indexed array example. What I---and others---are trying to tell you is that it's perfectly possible in Rust too. I don't think you've pointed out anything that isn't possible in Rust. My previous comment was exactly about composing containers to make higher-level ones. Have you tried building such things? Did you get stuck? M…

> I don't see any reason why implementing a free list in Rust wouldn't be possible either. Is placement new available in rust stable?

Why do you think placement new is necessary to implement a free list?

Re: Some Were Meant for C: The Endurance of an Unmanageable Language [pdf]

#252
post #250
post #249

Earlier quoted context omitted.

No. The major motivation not to use it was _FORTIFY_SOURCE with it's compile checks for compile-time known buffer sizes and it's accompanying _chk functions. This leaves out all dynamic buffers. You cannot mix PTR + LONG args without serious compile-time errors

I don't have any idea how _FORTIFY_SOURCE works, other than it is GCC specific and as such no place in ANSI C. What I know is that having something like strcpy_s() does not provide any actual safety, because with the prototype "strcpy_s(char * restrict s1, rsize_t s1max, const char * restrict s2)" there is no guarantee that s1max is a valid size for s1 .

This is what the _chk functions do. In most cases it know the compile-time size of s1. But in dynamic cases the _s functions are far better than the truncating 'n' versions. Read the rationale.

Re: Some Were Meant for C: The Endurance of an Unmanageable Language [pdf]

#253
post #241

Earlier quoted context omitted.

What year did Borland make that call? I remember my HS programming class in the late 1990s used a Borland compiler and development environment. I don't recall it being "enterprisey" at the time. That being said I was in HS, and likely associated the word "enterprise" with starships more than big companies.

When they re-braded themselves as Inprise, 1996. https://en.wikipedia.org/wiki/Borland

Hmm... I first touched a Borland compiler in the 1998-99 school year. I had programmed before that, but it was my first time programming a GUI with the Win32 APIs. I made a Battleship game with a very rudimentary AI so you could play against the computer. Not sure if Borland was good or evil at the time, but those memories will certainly endear me to them.
Post reply on HN