top | item 13967068

(no title)

erelde | 9 years ago

I am student and I like C, I've tested Rust/Go, I like the feeling of C. Maybe that sentiment will change later, but for now, I like C. It's simple and sharp and there's lots of doc/books.

discuss

order

IshKebab|9 years ago

C seems relatively simple, but it's also incredibly easy to do the wrong thing usually without realising it. That's the problem. I suggest you read up about 'undefined behaviour'.

stevedonovan|9 years ago

'sharp' would be a good word ;) There's lots to like about it but writing good safe C is harder than it looks.

floatboth|9 years ago

Have you tried doing string manipulation in C? ;)

asveikau|9 years ago

Not OP, but I actually think string manipulation in C is really elegant. Many people who complain about it have too many allocations in their code and are trying to port the allocation-heavy non-C way of thinking to C. The C way I know focuses mainly on character at a time iteration with emphasis on not copying the source string.

I'm reminded of a time a colleague needed something like string.split, and working in c++ he filled a std::vector<std::string> with the result. Using a more C way he'd really only have needed a couple of pointers on the stack.

erelde|9 years ago

You can see two of my current school assignement on Github.

I try to avoid manipulating strings as much as possible. ;)