Alternatives?

By: cqwrteur (euloanty.delete@this.live.com), July 12, 2021 11:05 pm
Room: Moderated Discussions
Brendan (btrotter.delete@this.gmail.com) on July 12, 2021 8:52 pm wrote:
> Hi,
>
> FrankHB (frankhb1989.delete@this.gmail.com) on July 12, 2021 10:57 am wrote:
> > Brendan (btrotter.delete@this.gmail.com) on July 12, 2021 2:34 am wrote:
> > > > Also recently I've found the stupidity like this:
> > > > https://github.com/Rust-for-Linux/linux/commit/c606d85a0d3c67b8221fee5fa67028bdebd4b0cc#diff-521fe5c9ece1aa1f8b66228171598263574aefc6fa4ba06a61747ec81ee9f5a3
> > > >
> > > >
> > > > Instead of doing this
> > > > void foo()
> > > > {
> > > > p[1].x().y() = p[2].x().y();
> > > > }
> > > >
> > > >
> > > > Now you have to do this. Who the fuck in rust team though this is a good idea.
> > > > ///SAFETY: p has 5 elements
> > > > ///XXXX
> > > > ///XXXX
> > > > unsafe fn foo()
> > > > {
> > > > (unsafe{p.get_mut_unchecked(1)}.unsafe {x()}.unwrap().unsafe{y()?})? =
> > > > (unsafe{p.get_mut_unchecked(2)}.unsafe {x()}.unwrap().unsafe{y()?})?;
> > > > }
> > > >
> > > > Rust one is completely unreadable, wasting programmers time and probably even leading to slower compilation.
> > >
> > > Unlike C++; where it's impossible to be sure what something as innocent looking as "a = b + c;"
> > > actually does without scouring the source code to determine who overloaded what; where compile
> > > times have a reputation for being the worst of any language ever created (despite scavenging the
> > > concept of modules from other languages and slapping it onto their huge pile recently)?
> >
> > This is red herring. The example is about some crazy and
> > absurd code abuse, which is also complaint by average
> > Rust users. In constrast, operator overloading is quite idiomatic and irrelavant to the point here.
> >
> > As of this C++ case, it should not cause trouble once the overloaded operator is well-designed
> > to expose its intent properly. It is also ridiculous to blame the contextual-dependent nature
> > solely of the overloading. The name lookup on variables "a", "b" and "c" also requires reading
> > the declaration to ensure the meaning clear, so you are actually forbidden from being that
> > innocent unless you don't use any languages having such kinds of scoped variables.
>
> For C, you know "a = b + c;" is definitely addition involving some kind of numbers without looking at any
> variable's declaration, and that it's definitely not likely to be a performance problem (note: the introduction
> of complex numbers made this statement "slightly less true", but only slightly). ​For C++, even if you know
> one variable is a plain "int" it still might format your hard drive (or concatenate, or search a list, or
> take your cache out behind the back shed and slap it around for 2 hours, or ...). Alternatives to overloading
> (e.g. "a = b.add(c);") provide an unmistakable warning that natural assumptions may not apply.
>
> > BTW, overloading, being a form of ad-hoc polymorphism, is
> > certainly evil in many sorts. But in the context of
> > C++, my hatred to the feature mostly comes from the effects
> > that over-complicated overloading rules bloat the
> > language specification (i.e. ISO/IEC 14882) a lot. As of Rust... well, where is the language specification?
> >
> > And thanks to Rust, reputation of compile time of today's C++ seems to be
> > promoted a bit. (I'm against C++ module for some other reasons, though.)
> >
> > > > If the goal of Rust team is to make everything painful, why should I waste time to fight against
> > > > the compiler? Instead of using that time to sanitize and fuzz? What's the benefit of using it?
> > >
> > > Heh. This is how I feel about "smart pointers" in C++. If the goal of C++ is to double
> > > the (already 10 times worse) learning curve why should I fight against the compiler?
> >
> > Why do you feel C++'s smart pointers difficult to learn? Is
> > Rc really simpler than shared_ptr besides the spelling?
>
> Originally I went from electronics to assembly to C. When I learnt C++ in the 1990s my brain was in "decide
> what you want the CPU to do, then try to express what the CPU should do in whichever language you're using"
> mode. Higher level languages don't help you express "what the CPU should do" any more than C does, so I mostly
> just learnt to hate C++ due to all the extra stuff that had no value to me at the time. C++ has evolved since
> but the fundamental reason I didn't like it the first time persist (and first impressions are hard to break).
> Basically; it probably isn't hard to learn smart pointers, it's just hard to find the enthusiasm to try.
>
> The strange thing is I didn't have the same trouble with Python, Java or C#. I think denying the ability
> to do anything low level up front forces me to accept that they're a "bubble wrapped plastic world" before
> I get frustrated (especially if it's the right job for the tool); while C++ gives people the choice to be
> frustrated (because of high level features) or to be frustrated (because of low level features).
>
> Of course mostly what I'm doing here is reflecting cqwrteur's attitude
> towards Rust back at cqwrteur as an attitude towards C++.
>
> > > Note: I'm not a Rust advocate (I'm just willing to let other people spend their time experimenting
> > > so I can obtain better empirical evidence about the benefits and pitfalls of certain language features).
> > > To me; the goal should be to reduce complexity of the language
> > > (because I think "more complexity" translates
> > > directly into "higher chance of mistakes" and that programmers have enough complexity to deal with
> > > from the problem their code is trying to solve), and to reduce the time between a programmer making
> > > a mistake and the programmer finding out a mistake was made (primarily by designing language to maximize
> > > the practicality and effectiveness of "continual analysis while you type").
> > >
> >
> > Professional empirical evidence (in the sense of programming language theory and authoring the language
> > specification) shows both C++ and Rust are the kind of most evil ones about both complexity of language
> > rules and learning curves for most users. There do exist a few worse, say, Haskell; but C++ and Rust are
> > already enough far from easy and simple for non-specialists.
> > And they will both become worse in the forseeable
> > future. I don't see the essential differences here, besides "disgned by commitee v. community".
>
> Alan Kay is teaching children to program Squeak in to be trying to convince programmers who already have 4+ years of University to spend
> an extra 2 years retraining (for new features and new languages) every 2 years. ;)
>
> - Brendan
>

LOL. Try to educate people like me who never use OOP?

Also you said you cannot use python, java whatever. That only proves you are out.

I use C with Concepts. Not C with Classes. OOP is dead.


I failed to see how printf("Hello Worldn"); tells you how machine works compared to my fast_io's

print(fast_io::out(),"Hello Worldn");//tranlate to __NR_write syscall

Do you know how slow and bloat of stdio.h is? stdio.h and format string whatever are historical mistakes.

https://github.com/tearosccebe/fast_io/blob/master/examples/0001.helloworld/helloworld_out.cc

https://github.com/tearosccebe/fast_io/blob/cleanup/include/fast_io_hosted/platforms/posix.h
< Previous Post in ThreadNext Post in Thread >
TopicPosted ByDate
Is unsafe hell truly good for linux kernel in the future?cqwrteur2021/07/09 09:56 PM
  Is unsafe hell truly good for linux kernel in the future?Brendan2021/07/10 12:59 AM
    Is unsafe hell truly good for linux kernel in the future?cqwrteur2021/07/10 01:37 PM
  Is unsafe hell truly good for linux kernel in the future?anon2021/07/10 04:14 AM
    Is unsafe hell truly good for linux kernel in the future?cqwrteur2021/07/10 01:40 PM
      Is unsafe hell truly good for linux kernel in the future?Gabriele Svelto2021/07/10 03:59 PM
        Is unsafe hell truly good for linux kernel in the future?cqwrteur2021/07/10 04:42 PM
      Is unsafe hell truly good for linux kernel in the future?anon2021/07/11 06:11 AM
        Is unsafe hell truly good for linux kernel in the future?cqwrteur2021/07/12 12:40 PM
  Is unsafe hell truly good for linux kernel in the future?Foo_2021/07/10 06:56 AM
    Is unsafe hell truly good for linux kernel in the future?cqwrteur2021/07/10 09:59 AM
      Most RWT posters don’t decide what goes into the Linux kernelMark Roulo2021/07/10 12:55 PM
      Is unsafe hell truly good for linux kernel in the future?Foo_2021/07/22 11:10 AM
    Is unsafe hell truly good for linux kernel in the future?cqwrteur2021/07/10 10:22 AM
      Is unsafe hell truly good for linux kernel in the future?cqwrteur2021/07/10 10:24 AM
        Déja VuDismissive2021/07/10 10:41 AM
          Déja Vucqwrteur2021/07/10 10:47 AM
            Déja VuDismissive2021/07/10 10:51 AM
            Déja VuMichael S2021/07/10 01:11 PM
  Is unsafe hell truly good for linux kernel in the future?Gabriele Svelto2021/07/10 12:51 PM
    Is unsafe hell truly good for linux kernel in the future?cqwrteur2021/07/10 01:32 PM
      Is unsafe hell truly good for linux kernel in the future?Michael S2021/07/10 02:04 PM
        Is unsafe hell truly good for linux kernel in the future?cqwrteur2021/07/10 02:25 PM
      Is unsafe hell truly good for linux kernel in the future?Gabriele Svelto2021/07/10 03:56 PM
        Is unsafe hell truly good for linux kernel in the future?cqwrteur2021/07/10 04:41 PM
          Is unsafe hell truly good for linux kernel in the future?Rayla2021/07/10 05:33 PM
            Is unsafe hell truly good for linux kernel in the future?cqwrteur2021/07/10 06:27 PM
              Interesting response... (NT)Rayla2021/07/10 09:02 PM
                perhaps just another lousy AI bot? (NT)anonymou52021/07/10 09:33 PM
                  perhaps just another lousy AI bot?dmcq2021/07/10 11:26 PM
                    perhaps just another lousy AI bot?cqwrteur2021/07/10 11:56 PM
                      perhaps just another lousy AI bot?dmcq2021/07/11 03:29 AM
                      perhaps just another lousy AI bot?anon2021/07/11 06:16 AM
                        perhaps just another lousy AI bot?cqwrteur2021/07/12 03:56 PM
                    perhaps just another lousy AI bot?Rayla2021/07/11 06:13 AM
                      perhaps just another lousy AI bot?cqwrteur2021/07/11 11:59 AM
                        When did I call you a bot, Kebabbert? (NT)Rayla2021/07/11 08:51 PM
              Alternatives?Brendan2021/07/11 01:54 AM
                Alternatives?Michael S2021/07/11 06:01 AM
                  Alternatives?Brendan2021/07/11 06:51 AM
                    Alternatives?cqwrteur2021/07/11 11:58 AM
                      Alternatives?Gabriele Svelto2021/07/12 01:31 AM
                        Alternatives?Michael S2021/07/12 03:58 AM
                          Alternatives?anon22021/07/12 09:08 AM
                            Alternatives?Michael S2021/07/12 09:22 AM
                              cqwrteur: Keep it politeDavid Kanter2021/07/13 08:59 AM
                          Alternatives?dmcq2021/07/12 09:37 AM
                            Alternatives?cqwrteur2021/07/12 04:04 PM
                              Alternatives?dmcq2021/07/12 04:26 PM
                                Alternatives?cqwrteur2021/07/13 01:47 AM
                                  Alternatives?dmcq2021/07/13 06:54 AM
                          Alternatives?Jörn Engel2021/07/13 04:53 PM
                            Alternatives?FrankHB2021/07/17 07:56 AM
                          Differences between Rust and C/GoGabriele Svelto2021/07/14 05:57 AM
                            Differences between Rust and C/GoFrankHB2021/07/17 09:47 AM
                        Alternatives?FrankHB2021/07/12 10:08 AM
                          Alternatives?Gabriele Svelto2021/07/14 02:28 PM
                            Inappropriate messages removed: cqwrteurDavid Kanter2021/07/15 10:59 AM
                            Alternatives?FrankHB2021/07/16 06:43 AM
                              Alternatives?Anon2021/07/16 12:01 PM
                                Alternatives?Gabriele Svelto2021/07/16 01:44 PM
                                Type abstraction and kernel programmingFrankHB2021/07/17 01:44 AM
                                  Type abstraction and kernel programmingdmcq2021/07/18 04:00 AM
                                    Type abstraction and kernel programmingdmcq2021/07/18 04:36 AM
                                  Type abstraction and kernel programmingEtienne Lorrain2021/07/19 01:03 AM
                                    Type abstraction and kernel programmingdmcq2021/07/19 02:01 AM
                                      Type abstraction and kernel programmingAnon2021/07/19 02:05 AM
                                        Type abstraction and kernel programmingdmcq2021/07/19 03:23 AM
                                      Type abstraction and kernel programmingBrendan2021/07/19 07:05 AM
                                Alternatives?gallier22021/07/20 04:57 AM
                                  Alternatives?Anon2021/07/20 06:24 AM
                                    Alternatives?Michael S2021/07/20 10:14 AM
                                      Alternatives?Anon2021/07/20 10:53 AM
                                        Alternatives?gallier22021/07/21 11:44 PM
                                      Alternatives?Adrian2021/07/20 12:00 PM
                                        Alternatives?Brett2021/07/20 11:13 PM
                                          Alternatives?Michael S2021/07/21 02:12 AM
                                            Alternatives?dmcq2021/07/22 12:58 PM
                                          Alternatives?Anon2021/07/21 08:58 AM
                      Alternatives?Brendan2021/07/12 02:34 AM
                        Alternatives?FrankHB2021/07/12 10:57 AM
                          Alternatives?cqwrteur2021/07/12 12:55 PM
                            Alternatives?FrankHB2021/07/12 09:44 PM
                          Alternatives?Brendan2021/07/12 08:52 PM
                            Alternatives?cqwrteur2021/07/12 11:05 PM
                              Alternatives?Anon2021/07/12 11:42 PM
                                Alternatives?cqwrteur2021/07/13 12:42 AM
                                Alternatives?cqwrteur2021/07/13 12:44 AM
                                  Alternatives?Anon2021/07/13 08:32 PM
                                    Alternatives?cqwrteur2021/07/13 09:36 PM
                                    Alternatives?cqwrteur2021/07/13 09:39 PM
                                      Alternatives?Anon2021/07/13 10:02 PM
                                        Alternatives?cqwrteur2021/07/13 10:18 PM
                                    Alternatives?cqwrteur2021/07/13 09:49 PM
                                      Alternatives?Anon2021/07/13 10:07 PM
                                        Alternatives?cqwrteur2021/07/13 10:16 PM
                                          Alternatives?Anon2021/07/13 11:31 PM
                                            Alternatives?cqwrteur2021/07/14 12:30 AM
                                              Alternatives?Anon2021/07/14 01:55 AM
                                                Alternatives?cqwrteur2021/07/14 02:22 AM
                                                  Alternatives?Anon2021/07/14 03:05 AM
                                                    Alternatives?cqwrteur2021/07/14 03:11 AM
                                                      Alternatives?Anon2021/07/14 04:16 AM
                                                        Alternatives?cqwrteur2021/07/14 07:06 AM
                                                          Alternatives?Anon2021/07/14 08:20 AM
                                                            Alternatives?cqwrteur2021/07/14 08:51 AM
                                                              Alternatives?Anon2021/07/14 12:33 PM
                                                              Alternatives?Gabriele Svelto2021/07/14 01:19 PM
                                                                Alternatives?FrankHB2021/07/16 07:07 AM
                                            Alternatives?cqwrteur2021/07/14 12:33 AM
                                              Alternatives?Anon2021/07/14 01:57 AM
                                                Alternatives?cqwrteur2021/07/14 02:21 AM
                                                  Alternatives?dmcq2021/07/14 03:06 AM
                                                    Alternatives?cqwrteur2021/07/14 03:50 AM
                                                  Alternatives?2021/07/15 08:33 AM
                                                    Alternatives?FrankHB2021/07/16 07:13 AM
                                            Alternatives?cqwrteur2021/07/14 12:39 AM
                                              Alternatives?Anon2021/07/14 02:08 AM
                                                Alternatives?cqwrteur2021/07/14 02:20 AM
                                                  Alternatives?dmcq2021/07/14 02:46 AM
                                                    Alternatives?cqwrteur2021/07/14 02:52 AM
                                                      Alternatives?dmcq2021/07/14 10:13 AM
                                                        Alternatives?dmcq2021/07/14 10:23 AM
                                                        Dealing with memory errorsBrendan2021/07/14 12:50 PM
                                                          Dealing with memory errorsdmcq2021/07/14 04:27 PM
                                                            Dealing with memory errorsBrendan2021/07/14 04:55 PM
                                                    Alternatives?cqwrteur2021/07/14 03:12 AM
                                                      Alternatives?Anon2021/07/14 04:16 AM
                                                        Alternatives?cqwrteur2021/07/14 06:55 AM
                                                      Alternatives?FrankHB2021/07/16 07:27 AM
                                                Alternatives?cqwrteur2021/07/14 02:38 AM
                                                  Alternatives?anon2021/07/14 03:50 AM
                                                    Stop feeding that trollnone2021/07/14 04:13 AM
                                                    Alternatives?cqwrteur2021/07/14 07:39 AM
                                                      Alternatives?Brendan2021/07/14 12:15 PM
                                                  Alternatives?Anon2021/07/14 04:19 AM
                                                    Alternatives?cqwrteur2021/07/14 07:12 AM
                                                      Alternatives?Anon2021/07/14 08:17 AM
                                                        Alternatives?cqwrteur2021/07/14 08:47 AM
                                                          Alternatives?Anon2021/07/14 01:00 PM
                                                            Alternatives?cqwrteur2021/07/14 01:44 PM
                                                          Alternatives?2021/07/15 10:36 AM
                                                  Alternatives?Gabriele Svelto2021/07/14 01:26 PM
                                                    Alternatives?cqwrteur2021/07/14 01:46 PM
                                                      Alternatives?Gabriele Svelto2021/07/14 02:36 PM
                                                        Alternatives?cqwrteur2021/07/14 02:55 PM
                                                          Alternatives?Smoochie2021/07/15 12:07 AM
                                                  Alternatives?2021/07/15 08:37 AM
                                                    Alternatives?Brendan2021/07/15 11:21 AM
                                                      Alternatives?Anon2021/07/15 01:15 PM
                                                  Alternatives?FrankHB2021/07/16 07:27 AM
                                          Alternatives?None2021/07/14 02:50 AM
                                            Alternatives?cqwrteur2021/07/14 02:54 AM
                                            Alternatives?cqwrteur2021/07/14 02:55 AM
                                              Alternatives?Rayla2021/07/14 05:47 AM
                                                Alternatives?cqwrteur2021/07/14 06:54 AM
                                              Alternatives?Gabriele Svelto2021/07/14 01:43 PM
                                Alternatives?FrankHB2021/07/13 12:47 AM
                            Alternatives?FrankHB2021/07/13 12:05 AM
                              Alternatives?Michael S2021/07/13 01:01 AM
                                Alternatives?FrankHB2021/07/13 01:25 AM
                            Alternatives?Doug S2021/07/13 12:29 AM
                              Alternatives?cqwrteur2021/07/13 12:48 AM
                              Alternatives?FrankHB2021/07/13 01:07 AM
              Is unsafe hell truly good for linux kernel in the future?2021/07/12 06:27 AM
                Is unsafe hell truly good for linux kernel in the future?Anon2021/07/12 09:46 AM
                Is unsafe hell truly good for linux kernel in the future?Etienne Lorrain2021/07/13 02:00 AM
    Is unsafe hell truly good for linux kernel in the future?cqwrteur2021/07/10 01:38 PM
Reply to this Topic
Name:
Email:
Topic:
Body: No Text
How do you spell avocado?