Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"You shouldn't use gets(), it's dangerous and deprecated".

Heh.

No, I realize the code is from 1989 and gets() was not on the hitlist by then.

What is not so clear is if the first the author wrote after studying the posted code for a week, looked the same? I mean even in 1989 this must have been a bit controversial/extreme[1], but there is no mention of those aspects. I'm not sure what is being communicated, really.

[1] I don't think I had started writing C for real by then but if this was Basic code I would have screamed at it. :)



I’m pretty sure Roger Hui’s implementation of J was written in roughly Arthur’s style


Which is roughly "let's first create an domain-specific APL-core rudimentary language from C, and then write proper APL-family language using this DSL". Ken Iverson didn't write in C.


This is by Arthur of k and shakti (k9) fame; most his code is definitely not standard practice. His c code is still very terse etc. You get used to it.


I'd been using C for a couple years in 1989, and "never use gets()" was advice that had reached me. I don't remember how widespread that was.

The style was just as unusual at the time, though I think there was more variety in style generally, and lower standards most places (most of us didn't have open source or internet discussion to learn from).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: