Re: The Case for Rust (in any system)
- In reply to: Steffen Nurpmeso : "Re: The Case for Rust (in any system)"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 11 Sep 2024 06:49:12 UTC
On 09-09-24 21:31, Steffen Nurpmeso wrote: > Despite that it is unfortunate but true that prototypes in C and > also C++ not seldom do not tell the truth because bit enumerations > are missing, and so you have integers of various widths as "bit > carriers" through which completely unchecked bits are then passed. Non sequitur. This is due to the C and C++ type system, nothing to do with prototypes. > Or at least in C, which does not support "easy super-class cast"s, C++ has a stricter type system than C. That makes doing wrong things a bit more difficult > |I'm not sure that I follow your argument. Are you saying that you can > |build memory safety into C code and that if someone doesn't so they are > |a bad programmer? What's the point - why not just use a memory safe > |language? > > Because Floyd means pink not paul, hah! Is this the infants school playground? You just lost your last shred of credibility. > But answering your question i would say it does not make much of > a difference to me -- *if* i can go the way i want -- regarding > safety, but a lot regarding runtime and infrastructural overhead. > For example most of the development time i compile with tcc that > is 334640 bytes and links to almost nada. > > #?0|kent:built$ ll tcc#20240731-1.pkg.tar.zst > -rw-rw---- 1 ports ports 273285 Aug 3 22:11 tcc#20240731-1.pkg.tar.zst > > #?0|kent:built$ ll gcc#14.2.0-1.pkg.tar.zst > -rw-rw---- 1 ports ports 67854914 Aug 1 21:59 gcc#14.2.0-1.pkg.tar.zst > > #?0|kent:built$ ll clang#18.1.8-1.pkg.tar.zst > -rw-rw---- 1 ports ports 74166358 Jun 22 21:26 clang#18.1.8-1.pkg.tar.zst > #?0|kent:built$ ll llvm#18.1.8-1.pkg.tar.zst > -rw-rw---- 1 ports ports 136797237 Jun 22 23:57 llvm#18.1.8-1.pkg.tar.zst > #?0|kent:built$ ll compiler-rt#18.1.8-1.pkg.tar.zst > -rw-rw---- 1 ports ports 3378581 Jun 23 00:02 compiler-rt#18.1.8-1.pkg.tar.zst > > Unfortunately pcc is dead, it detected things that clang and gcc > did not (via warning options etc). tcc is very bad in such. IMO tcc is simply godawful. I would not touch it with a bargepole. I did once look at a tcc bug. I gave up as I felt that it wasn't worth trying to fix and obsolete port. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274211 A C compiler that can't compile hello world. [More ranting and crappy C macros deleted. Plonk.] A+ Paul