:: Re: [DNG] C vs ADA : advice sought
トップ ページ
このメッセージを削除
このメッセージに返信
著者: Didier Kryn
日付:  
To: dng
題目: Re: [DNG] C vs ADA : advice sought
Le 03/10/2024 à 12:23, marc a écrit :
> I did mention infrastructure complexity before. This has so
> many forms: Try bootstrapping an up to date rust
> toolchain from bare metal without doing a "wget |
> bash" somewhere. Just try, and be enlightened.
> Its supply chain attack surface is scary. Or
> perhaps a grand re-write which obsoletes yet another
> decade of worldwide effort. And don't forget
> submarine patents which can do the same.
>
> And then weirdest of all: Imagine the propaganda is
> true and every line of rust (or ada) code is magically
> free of security defects. Would you be really happy with
> the full consequences ?
>
> It will tilt power further towards the big AIs that
> are modern corporations. That will make every cell
> phone, tv, car or fridge impossible to jailbreak. At
> the moment I can buy a bit of electronics, drop it
> into a drawer and come back some years later when
> odds are good an awesome human has built better
> firmware which dials back on the spyware and adds
> actually useful features. A perfect rust world (hah,
> what an oxymoron) makes this impossible.
>
> At the risk of making a virtue out of a necessity,
> the current world where pretty much all infrastructure is
> written in C means that care, motivation and mastery
> matter. Something which corporations struggle to
> recognise never mind buy. It is not because of civic
> mindedness that most corporates have ended up using
> free software infrastructure - given a viable choice
> to close up, they will do so again.
>
> C means more frontier and less police state. Sure,
> that comes with the cost of outlaws and highwaymen,
> but the alternative may be a totalitarian state with
> corporate sponsored re-education camps. Some might say
> that with facebook, instagram and tiktok we are halfway
> there already. But code carefully, lest you build them
> to tools to complete the job.


    In C you have the well known instructions

    x += y;
    x -= z;
    x *= a;
    x /= b;

    etc... which are all some form of assignment; and you also have the
comparisons:

    ==  !=  >=  <=

    You can notice that all the above are made of two characters.There
is one exception amongst these operators: the assignment operator:

x = expresssion;

    In which the bare assignment operator is made of one single character.

    Imagine you introduce an optional compiler option which replaces
the assignment operator "=" by ":=" ...

    Then you get some consistency: all assignment and comparison
operators are made of two characters, the second one being '='. This
would improve significantly the safety of the C language. Do you think
this would restrict your freedom and/or open the door to AI and conspiracy?

    Yes you will need to type one more character in every instruction.
You'll lose half a second per line but save hours of nasty debugging.

--     Didier