4 ms·
What's terrible about the syntax? Using "[[require/ensure/invariant/proof/assert/etc.]]" is actually pretty neat. And given that almost all C programmers are a
by rramadass 1mo ago
What's terrible about the syntax? Using "[[require/ensure/invariant/proof/assert/etc.]]" is actually pretty neat.
And given that almost all C programmers are also C++ programmers, no mere syntax can faze us :-)
- binaryturtle 1mo agoIn my own ranking of favourite programming languages C is at the first place. C++ comes in last. I personally hate it when people write C/C++ as if it's the very same thing. I'm quite sure there's more like me out there. :) Interestingly Perl comes in second, even I use it rarely (aka not at all) these days. But that's a slightly off-topic side note. :)
- ahknight 1mo agoPerl is just C with less type safety. And yes, for the most part. C++ as simple shorthand for struct-attached functions and automatic memory management (no, not smart pointers; RAAI) is good. Every single thing added after that is misery and should push a modern developer to Rust, Go, or Zig (roughly in that order) where such things are implemented sanely or not at all.
- stvltvs 1mo agoFunny I think of Perl as Bash with slightly saner syntax plus robust regexp. (said with love)
- ahknight 1mo agoThis is also fair.
- hnlmorg 1mo agoThe only thing Perl and C have in common is the curly-brace.
- ahknight 1mo agoAnd direct access to system calls. And the uncanny ability to look like it's going to do what I want and then five minutes into a run wind up in a small town in Arkansas blind drunk and crying vaguely about fluffy red squirrels taking its sandwich.
- cwnyth 1mo agoBut it adds to the charm.
- joas_coder 1mo ago[dead]
- rramadass 1mo agoFor me, C++ is always in first place. It allows me to do high-level abstractions to low-level hijinks all with total control (i.e. zero-cost abstractions, Templates for compile time programming etc.) across all levels of the software stack and the full spectrum of available hardware. Furthermore, any C++ programmer who says they do not know C, knows neither C nor C++ (hence my preference in using C/C++ as a shorthand to encompass both and highlight the dependency of the latter on the former). I often see this in novice C++ programmers who started with "Modern C++" and identify it as something like Java/C# because of the now huge set of standard libraries and copious syntactic sugar which only compounds their confusion further.
- applfanboysbgon 1mo ago> Furthermore, any C++ programmer who says they do not know C, knows neither C nor C++ (hence my preference in using C/C++ as a shorthand to encompass both and highlight the dependency of the latter on the former). Right, but this dependency is one-way. There is an entire legion of C programmers who reject C++ (most notably Linus), so claiming that almost all C programmers are also C++ programmers is a bit off.
- rramadass 1mo agoWhat i meant was that almost all C programmers are aware of and know C++ to varying degrees. But they choose to not use it for their application based on needs/expertise/etc. Linus Torvalds objection to using C++ is perfectly logical for his use-case. I know many embedded programmers who refuse to use C++ even though they understand and agree with the benefits that it can bring to the table. Their C expertise is so good that when they program, cognitively the language just disappears and they "flow" through the problem solution implementation. This is the crux of problem-solving.
- cwnyth 1mo agoI'm always surprised on here when I see others admin to liking C and Perl. It makes me feel less alone.
- ahknight 1mo agoMany of us were there when yada yada white wizard. Hell, my first paid job was writing Perl CGI scripts. Well, script. Monolithic MFing thing spread across 100 files and running a whole company on text files with zero format documentation and RCS as version control. No need for CVS because the systems were incrementally archived with tar every hour... Until they weren't. (I'm glad you saw that coming, because they didn't.)
- EPWN3D 1mo ago> And given that almost all C programmers are also C++ programmers, no mere syntax can faze us :-) This is... not true at all.
- ahknight 1mo agoThe inverse is true, however. Especially the "almost" part.