Am 22.01.2018 um 17:59 schrieb Gord Tomlin:
On 2018-01-22 10:44, Jon Perryman wrote:
I also commented that C is a weak language compared to HLASM and gave some examples that force bad coding techniques (e.g. XML parser). A C programmer took offence because he had written an efficient XML parser in C.

Most programmers (whether C or Assembler) would not write their own XML parser. They would call a pre-existing parser. FWIW, in the past, I've done RYO parsing in both languages, and it was less work for me when I did it in C.


I'm the C programmer who was mentioned by Jon Perryman in the original post. In fact, I didn't take offence, but simply defended my decision (of 2001) to write the XML parser in C and argued that C is a good language to write some system
related stuff in it.

My boss asked me in 2001 to write a batch input facility (some sort of command interface) for our home grown software deployment system (on the mainframe), and he decided that it be a XML interface. The system was written in C (and REXX, based on DB2). So it was natural for me to write the XML parser in C. If he had told
me to write it in ASSEMBLER, I would have done that, too.

There was no other parser to be used at this time.

As it turned out, the parser was so good that others in the company wanted to use it, too. We added a PL/1 interface to it, so that PL/1 callers could use it
(and COBOL, and ASSEMBLER, ...)
Because it was written in C, it could used on other platforms (Windows, Unix, OS/2), too, which was very helpful, because we also have a large insurance math package, which is written in C and deployed on all of those platforms. In the
end, the XML parser was included into this package.

This would not have been possible, if the parser had been written in Assembler
in the beginning.

Kind regards

Bernd


I'm not here to defend C. It certainly has its warts. But just as it's not good for C programmers to proclaim C to be better than Assembler in each and every case, it's not good for Assembler programmers to do the reverse. Both languages have their places, and there are also many situations where neither one is the best choice.

Reply via email to