←back to thread

200 points jorangreef | 1 comments | | HN request time: 0.245s | source
Show context
lokl ◴[] No.24293396[source]
Zig is appealing to me, but I wonder whether time spent mastering Zig would be better spent mastering C.
replies(4): >>24293635 #>>24293667 #>>24294737 #>>24296869 #
jorangreef ◴[] No.24294737[source]
The first rule of C is that no one masters C, but you could try anyway and still have time to master Zig in a matter of weeks, which is a rounding error. Given that both offer a C compatible ABI, what would serve your projects better?
replies(2): >>24294781 #>>24294866 #
cmrdporcupine ◴[] No.24294781[source]
<rant-time>

I can't help but feel like in our industry C is successful (vs its 80s competition of Pascal/Modula-2, or Ada etc.) partially because of some of the same reasons that Git is successful now. Yes, it is powerful and flexible; but also in some ways unnecessarily arcane and 'dangerous' and _this gives the user a feeling of cleverness_ that is seductive to software engineers.

Put another way: Most of us enjoy the mental stimulation of programming, and we enjoy the mental challenges (in general). C makes us feel clever. Witness the "obfuscated C programming contest" etc.

Same thing that has led to nonsense 'brain teaser' whiteboard-algorithm tests at job interviews. IMHO it's in many cases for the benefit of the interviewer's ego, not the company or the interviewee ("gotcha! no job for you!").

</>

replies(2): >>24294845 #>>24296848 #
1. PaulDavisThe1st ◴[] No.24296848[source]
Given that you can "write Fortran in any language", I find this analysis unlikely.

I much prefer writing Python or Lisp code than C++, but I can't do my job in Python or Lisp code, so I write C++.