Announcement

Collapse
No announcement yet.

GNOME Might Need To Crack Down On Their JavaScript Extensions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #81
    Originally posted by Weasel View Post
    lol at all these "modern language" fanboys. You also forgot D.

    Why don't you guys bash Vulkan too? Stick with OpenGL eh? Vulkan too low level, too hard for some people's mental capacity, just like with C it's too hard to reason with pointers properly and clean after their own. Oh, I get it, it's because Vulkan is "newer" than OpenGL, while C is not a "new" language. I get it, if C was new it would be the best language ever eh?

    Honestly, even ignoring any and all technical stuff about C/C++ vs other inferior languages, you simply look at for example some Rust code and see these words and know to get the fuck out of there:
    Code:
    let mut
    Eh C/C++ have their place but that place is not high level application development. A good C++ program may be better than a good (picking random "safe" language) python program, but a good python program is both easier to make and better than a crappy C++ program. Even experienced developers make mistakes now and again, and C++ is *not* a language that's friendly to mistakes. More modern low level languages like Go and Rust make it harder to develop bad applications (once you learn to use them of course).

    And really? How is
    Code:
    let mut x: i32 = 5;
    really any different from
    Code:
    int x = 5;
    other than that you explicitly define if it's mutable or not? You're giving the compiler more info so it can better catch any mistakes or slip ups you make. Nobody's perfect, and that kind of thing helps a lot with catching errors down the road.

    Comment


    • #82
      Originally posted by Sniperfox47 View Post
      And really? How is
      Code:
      let mut x: i32 = 5;
      really any different from
      Code:
      int x = 5;
      other than that you explicitly define if it's mutable or not? You're giving the compiler more info so it can better catch any mistakes or slip ups you make. Nobody's perfect, and that kind of thing helps a lot with catching errors down the road.
      Two points you didn't mention which should be mentioned to be more fair to Rust:
      1. You don't usually need the : i32 because i32 is what untyped integer literals default to in the absence of other inferred constraints.
      2. You could also ask how const int x = 5; is better than let x = 5; in the common case of values not intended to be modified.

      Comment


      • #83
        Originally posted by Weasel View Post
        you simply look at for example some Rust code and see these words and know to get the fuck out of there:
        Code:
        let mut
        Every time I see "let" it makes me think Rust was influenced by BASIC.

        Comment


        • #84
          Originally posted by tildearrow View Post

          Every time I see "let" it makes me think Rust was influenced by BASIC.
          It was influenced, among others, by OCaml.

          Comment


          • #85
            Originally posted by tildearrow View Post

            Every time I see "let" it makes me think Rust was influenced by BASIC.
            Hey, even javascript uses "let" now days :P.

            Comment


            • #86
              Originally posted by Sniperfox47 View Post
              Eh C/C++ have their place but that place is not high level application development. A good C++ program may be better than a good (picking random "safe" language) python program, but a good python program is both easier to make and better than a crappy C++ program.
              And the python program will forever be crappy. The C++ program won't, because the guy's skills will improve as he uses the language and continues making mistakes. It has a chance to improve, any any change higher than 0 is worth it. People improve from mistakes, not from being sheltered by them.

              Originally posted by Sniperfox47 View Post
              Even experienced developers make mistakes now and again, and C++ is *not* a language that's friendly to mistakes.
              Nor should it be. People learn from mistakes, that applies to everyone. Sheltering them only leads to worse "programmers", that's why the vast majority attracted by the "modern" languages (including Javascript) are just horrible programmers.

              Originally posted by Sniperfox47 View Post
              And really? How is
              Code:
              let mut x: i32 = 5;
              really any different from
              Code:
              int x = 5;
              other than that you explicitly define if it's mutable or not?
              Seriously? Look how verbose it is, even when it uses extremely short keywords (i.e. mut instead of mutable). Both let and mut are completely superfluous, as variables ought to be, well, mutable by default (that's why they are called variables). But let is a completely retarded keyword and serves zero purpose. Same as "var" in javascript.

              But that's not even my problem with it! It just sounds completely retarded when you read it in your mind, i.e. syntax is retarded. If it was just:
              Code:
              i32 x = 5;
              it would be like C and just fine. It's not like C/C++ don't have constant and mutable variables, it's just the default is the opposite: to make a constant you explicitly say "const", which is easier to reason with than "mut". (and let is completely superfluous and one of the keywords I really despise)

              Comment


              • #87
                Originally posted by Weasel View Post
                Seriously? Look how verbose it is, even when it uses extremely short keywords (i.e. mut instead of mutable). Both let and mut are completely superfluous, as variables ought to be, well, mutable by default (that's why they are called variables). But let is a completely retarded keyword and serves zero purpose. Same as "var" in javascript.
                You seem to have quite a lot of preconceived ideas. I know I can't change them, but I'll still try to clear things up:
                • "let x = 5" is shorter than "const int32_t x = 5"; if you do want to specify the type, it's "i32", instead of "int32_t" or "int" (which you can't tell what ends up as).
                • "let" introduces bindings, not variables -- it names values. It's not superfluous because there are idioms when you actually want to shadow a binding
                • you say that "let mut" is always what you want. Usually these strong, statically-typed languages try to guide the user by imposing some constraints. If you don't want constraints, you can use JavaScript, Python, ASM or whatever else you want. In this case, the constraint is that you shouldn't change every variable will-nilly, but be purposeful about it. "let mut" is also nice for the reader, giving you a heads-up. Do you use C-style casts in C++ because "they do what you want"?
                • "const" in C and C++ doesn't propagate through pointers and references, so it's actually not great at all
                • and finally, I'm sure there are quite a lot of good Python and JavaScript developers; to follow up on your line of thinking, maybe using "crappy" languages makes the good ones better, since they have no compiler to help them
                Also, throwing around adjectives like "retarded" often tends to upset people, and never brings anything good. The things you don't like about Rust (or anything else) might have a good reason for existing. And there are a lot of languages in the world, so you (and everyone else) are free to use whatever you like.

                Anyway, this thread should be about whether GNOME's extensions can be fixed, not about the superiority of one programming language over another.

                Comment


                • #88
                  Originally posted by GrayShade View Post
                  "let x = 5" is shorter than "const int32_t x = 5";
                  No because you don't specify the type so it's not equivalent hence your comparison is meaningless. You can always use i32 if you want in C/C++, just make your own typedef? let is completely superfluous and sounds stupid. This is not math, imperative languages have nothing to do with math. Maybe in Haskell only.

                  Originally posted by GrayShade View Post
                  you say that "let mut" is always what you want. Usually these strong, statically-typed languages try to guide the user by imposing some constraints. If you don't want constraints, you can use JavaScript, Python, ASM or whatever else you want. In this case, the constraint is that you shouldn't change every variable will-nilly, but be purposeful about it. "let mut" is also nice for the reader, giving you a heads-up. Do you use C-style casts in C++ because "they do what you want"?
                  Huh? I said it should be the default, not that it's always what you want. If you want a constant instead of a variable, just use const? Bonus: it doesn't sound retarded like "let mut". I also favor strongly typed languages. Just because I disagree with the defaults imposed on Rust doesn't mean I'm against them, what the hell?

                  But my complaint before wasn't necessarily the defaults per se. It was the naming and syntax. It just sounds retarded. "var" is not much better (javascript).

                  Originally posted by GrayShade View Post
                  "const" in C and C++ doesn't propagate through pointers and references, so it's actually not great at all
                  Please explain, I don't know what you mean here. You can't assign (without a cast) a non-const reference to a const object, neither a pointer. Of course, there's a difference between const int* and const int* const. The latter means the pointer is const, not just what it points to.

                  There are some problems with C/C++ syntax, like the above with a bit confusing parsing, but it's nothing once you get the "hang" of it, at least it won't sound retarded in your head as you read the code mentally.

                  Originally posted by GrayShade View Post
                  and finally, I'm sure there are quite a lot of good Python and JavaScript developers; to follow up on your line of thinking, maybe using "crappy" languages makes the good ones better, since they have no compiler to help them
                  Yes, I never said that all of them are crappy. Most of the time, though, they can also code in less "safe" languages, so there's that. A lot of top tier programmers don't use assembly language (much) but they know it which changes the way they code in C/C++ also.

                  But like with any skill in life, if you don't use it, you lose it. So being sheltered for too long makes you rusty. (pardon the pun)


                  I realize you don't like me calling them "retarded" but what do you want me to use instead? Most of the time you spend reading code in your head. "let mut" simply sounds retarded, idk how else I can put it. "let" by itself isn't much better though, why can't it just be simple assignment?

                  Comment


                  • #89
                    Weasel C is not going away anytime soon and there is a very good reason NASA uses it and there are still people coming to learn it, like me just bought Brian W. Kernighans' and Dennis M. Ritchies' ANSI C second edition myself will get around to learning it.

                    Comment


                    • #90
                      All languages have their places obviously but when a languages reach is over extended thats where problems develop. Of coarse some will say no duhh but I'm just saying.

                      Not every WM is going to have Xfce's or i3's simplicity and elegance that does not gum up the works with what I think extensions should never be used. I like both gtk and qt.

                      Java script is bad enough on the web, its about time everyone draws a line and leaves it there. Ok now I am hiding from the flames about to be thrown at me.
                      Last edited by creative; 02 August 2018, 04:12 PM.

                      Comment

                      Working...
                      X