Date: Wed, 11 Sep 2024 06:49:12 +0000 From: Paul Floyd <paulf2718@gmail.com> To: freebsd-hackers@freebsd.org Subject: Re: The Case for Rust (in any system) Message-ID: <4fb5a7ec-41dc-43ed-8abe-97208013c941@gmail.com> In-Reply-To: <20240909213107.XGD3_v0I@steffen%sdaoden.eu> References: <CAOtMX2iCNX5OkdeghnbmcMrO0UYWwm4zfxFSZGznOznu%2Bmh5rA@mail.gmail.com> <20240905194529.3szOViVM@steffen%sdaoden.eu> <9adc3619-bc38-4fe7-bf16-20e0dfb3b619@gmail.com> <20240909213107.XGD3_v0I@steffen%sdaoden.eu>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4fb5a7ec-41dc-43ed-8abe-97208013c941>