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

Thanks for mentioning Nim! :-)

I can't say I agree with anything you say though... So only memory safety is C's problem? Not its type system that's very weak in every aspect (not just memory safety)? Not its missing module system? Not its ambiguous syntax?

You also confuse "simple" with "primitive" and perhaps "familiar". C surely is primitive, but how is it simple? Simple to use? No. Simple to implement? Not really. Has a simple mapping to the underlying hardware? That stopped being true three decades ago.



> Has a simple mapping to the underlying hardware? That stopped being true three decades ago.

I've seen this claim repeated a few times in the thread and I still have no idea what it means.

For medium levels of optimisation it's usually very simple to predict what assembly code will be generated by C compilers. On many platforms the operators often match directly to a instruction (e.g. arithmetic and bitwise operations) or short patterns of instructions (the control flow primitives and conditional execution, equality testing, function calling, etc). At a higher level, compiled C functions look pretty much exactly like manually written assembly language procedures and structs are just blocks of memory with clear order and offsets. It's also very simple to interface C and assembly code without any hacks on either side.




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

Search: