I am probably too old school: Unless properly documented (the "whats" and especially the "whys") and provided with a test harness (plus the test cases, including all fringe cases btw.) just reject it straight away. And…
Clearly the author never worked with a CM2 - I did though. The CM2 was more like a co-processor which had to be controlled by a (for that age) rather beefy SUN workstation/server. The program itself ran on the…
C definitely does not need this - in fact I would go as far and consider it harmful. I agree that a feature like this could be useful, but then there are other useful features which should be added too. Where do you…
C was designed in the 1970s with the goal of giving you minimal overhead, bar using a macro-assembler. The way C handles "strings" provides exactly that. The OP clearly stated that he did not mind the overhead (in terms…
I don't have an issue with the OP's example, which is quite nifty indeed, despite the penalties incurred.
s is still a pointer to character. This is just an optimised shorthand for (assuming ASCII): char s[3]; Which is then initialised with: 0x48,0x69,0x00 There simply is no such thing as a string type in C. All the…
Sorry, but there is a significant misunderstanding: There is no such thing as a string in C. What you call a string is a pointer to char (typically "int8") - nothing more nothing less. The \0 termination is just a…
I am probably too old school: Unless properly documented (the "whats" and especially the "whys") and provided with a test harness (plus the test cases, including all fringe cases btw.) just reject it straight away. And…
Clearly the author never worked with a CM2 - I did though. The CM2 was more like a co-processor which had to be controlled by a (for that age) rather beefy SUN workstation/server. The program itself ran on the…
C definitely does not need this - in fact I would go as far and consider it harmful. I agree that a feature like this could be useful, but then there are other useful features which should be added too. Where do you…
C was designed in the 1970s with the goal of giving you minimal overhead, bar using a macro-assembler. The way C handles "strings" provides exactly that. The OP clearly stated that he did not mind the overhead (in terms…
I don't have an issue with the OP's example, which is quite nifty indeed, despite the penalties incurred.
s is still a pointer to character. This is just an optimised shorthand for (assuming ASCII): char s[3]; Which is then initialised with: 0x48,0x69,0x00 There simply is no such thing as a string type in C. All the…
Sorry, but there is a significant misunderstanding: There is no such thing as a string in C. What you call a string is a pointer to char (typically "int8") - nothing more nothing less. The \0 termination is just a…