Announcement

Collapse
No announcement yet.

GNOME Might Need To Crack Down On Their JavaScript Extensions

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

  • Originally posted by schmalzler View Post
    Wow, never thought about that. I'm not sure if the committee knows about that. I am sure you could speedup the parser tremendously!
    Who cares about the parser? I'm talking about someone who's reading the code. I never denied the C++ parsing rules are complex (C is actually fairly easy though). But that's not even (always) a bad thing: a language shouldn't be "simple" because then we'd all be using Brainfuck. Simplicity is not the best thing, there's a balance.

    For reading the code, which is what matters, it definitely reads much better than Rust code with all those "let" and "let mut" around.

    DISCLAIMER: Yes, this is an opinion, my opinion and those who share it. Like, you know, all the other anti-C flaming posts in here which are also just opinions. Why no mention of that eh?
    Last edited by Weasel; 03 August 2018, 08:14 AM.

    Comment


    • Weasel, you again mix your personal preferences and abilities with general statements about the quality of programming languages.
      I have difficulties to understand anything but C++ and D. C sometimes is a mystery. Rust, Go, Haskell, etc. are even worse. But I never really tried to learn those languages.
      It's like with spoken languages. Polish is so weird. Or Hungarian. Or even worse - all those languages writing in Cyrillic like Russian, Serbian, Bulgarian... But I would never judge those languages or people using them by my understanding of those languages.

      Calm down and accept that you never had a use for those programming languages.

      Comment


      • Originally posted by Weasel View Post
        Who cares about the parser? I'm talking about someone who's reading the code. I never denied the C++ parsing rules are complex (C is actually fairly easy though). But that's not even (always) a bad thing: a language shouldn't be "simple" because then we'd all be using Brainfuck. Simplicity is not the best thing, there's a balance.

        For reading the code, which is what matters, it definitely reads much better than Rust code with all those "let" and "let mut" around.

        DISCLAIMER: Yes, this is an opinion, my opinion and those who share it. Like, you know, all the other anti-C flaming posts in here which are also just opinions. Why no mention of that eh?
        I'm primarily a C++ programmer, who has defended C++ on multiple occasions, not on this forum but I've yet to really see an "attack" on C here.

        My issue is not with your statements that it's ugly or that it messes with your head. My issue is with your totally unjustified claims as to the quality of these languages and the quality of programmers they contribute towards. That kind of elitism and egocentrism doesn't earn you any favor and if people talked about C/C++ in the same terms I would be equally up in their face. To this point nobody's made comments along the lines of "C++ is a terribly designed language. It trains programmers to ignore memory bugs and ship them to their users. It's part of the reason we have so many terrible low level programmers!".

        While I also find C++ to be cleaner, beauty is in the eye of the beholder and verbosity is not inherrently a bad thing. There's nothing poorly designed about Rust, Javascript, Python, C#, Go, or any of the other widely used language, any more than C, C++, or even brainfuck are "poorly designed".

        The fact of the matter is that switching to C wouldn't magically solve any of Gnome Shell's problems. JavaScript is not the problem here. Accessibility is not the problem because any language has terrible developers who will mess things up. The problem is the monkey patching a mission critical application is asinine. Monkey patching a mission critical application with no sandboxing or protection in place is even stupider.

        The only point anyone in here has been making is if they're going to do a rewrite in another language -and not radically change the design to better separate out the different pieces-, it's ultimately far safer to use a language that forces you to be safer about memory and error handling. C++ is a great tool but it's a tool that's best used for specific jobs. You wouldn't cut your steak with a scalpel, despite it being a "better" knife.

        Comment


        • Originally posted by schmalzler View Post
          Weasel, you again mix your personal preferences and abilities with general statements about the quality of programming languages.
          I have difficulties to understand anything but C++ and D. C sometimes is a mystery. Rust, Go, Haskell, etc. are even worse. But I never really tried to learn those languages.
          It's like with spoken languages. Polish is so weird. Or Hungarian. Or even worse - all those languages writing in Cyrillic like Russian, Serbian, Bulgarian... But I would never judge those languages or people using them by my understanding of those languages.

          Calm down and accept that you never had a use for those programming languages.
          I guess we are different in this respect then. I have no problems complaining about "spoken languages" if I think something sounds stupid in some of them, I do it all the time. Sometimes, even their native speakers agree with me, but that's rare (since most people are nationalists or have an irrational love for their country and thus language). I don't need to tell you this, but a lot of people make fun of German to the point it's become a meme compared to "gentler" languages, but that's for another topic.

          Also, I am perfectly calm. I don't know why you think otherwise, when I merely said (initially) that "let mut" just sounds stupid.

          Comment


          • Originally posted by Sniperfox47 View Post
            I'm primarily a C++ programmer, who has defended C++ on multiple occasions, not on this forum but I've yet to really see an "attack" on C here.

            My issue is not with your statements that it's ugly or that it messes with your head. My issue is with your totally unjustified claims as to the quality of these languages and the quality of programmers they contribute towards. That kind of elitism and egocentrism doesn't earn you any favor and if people talked about C/C++ in the same terms I would be equally up in their face. To this point nobody's made comments along the lines of "C++ is a terribly designed language. It trains programmers to ignore memory bugs and ship them to their users. It's part of the reason we have so many terrible low level programmers!".

            While I also find C++ to be cleaner, beauty is in the eye of the beholder and verbosity is not inherrently a bad thing. There's nothing poorly designed about Rust, Javascript, Python, C#, Go, or any of the other widely used language, any more than C, C++, or even brainfuck are "poorly designed".

            The fact of the matter is that switching to C wouldn't magically solve any of Gnome Shell's problems. JavaScript is not the problem here. Accessibility is not the problem because any language has terrible developers who will mess things up. The problem is the monkey patching a mission critical application is asinine. Monkey patching a mission critical application with no sandboxing or protection in place is even stupider.

            The only point anyone in here has been making is if they're going to do a rewrite in another language -and not radically change the design to better separate out the different pieces-, it's ultimately far safer to use a language that forces you to be safer about memory and error handling. C++ is a great tool but it's a tool that's best used for specific jobs. You wouldn't cut your steak with a scalpel, despite it being a "better" knife.
            Maybe I have drifted a bit from my initial point, I didn't really mean verbosity in that sense of the word. Descriptive verbosity is fine. I meant it more like "superfluous keywords", not necessarily "descriptive names". (as Rust is actually not verbose at all, and uses short forms of many words, even "mut" is one such)

            I meant, "let" is just a terrible keyword. Really the only place you even see it used is in math-speak papers or such "formal" ones (I know BASIC used it, but it was a horrible language since it used CAPS to begin with, just fugly). To me, it sounds just bad when I read code with it. And anyway, Javascript does suck on many levels (Rust much less, except for syntax though) but I guess I've already said it before so no point repeating it.

            Comment


            • Originally posted by schmalzler View Post
              Weasel, you again mix your personal preferences and abilities with general statements about the quality of programming languages.
              I have difficulties to understand anything but C++ and D. C sometimes is a mystery. Rust, Go, Haskell, etc. are even worse. But I never really tried to learn those languages.
              It's like with spoken languages. Polish is so weird. Or Hungarian. Or even worse - all those languages writing in Cyrillic like Russian, Serbian, Bulgarian... But I would never judge those languages or people using them by my understanding of those languages.

              Calm down and accept that you never had a use for those programming languages.
              I speak Polish, and what's interesting is that many parts of the language are very logical and consistent compared to English, but in other ways, there are things in English that make more sense. (as an example for Polish, if you can read it, you can pronounce it. There are no silent or changing sounds)

              Programming languages also have their positive and negative aspects. The ones that are purely bad don't become popular enough to argue about.

              Originally posted by Weasel View Post
              Javascript does suck on many levels (Rust much less, except for syntax though) but I guess I've already said it before so no point repeating it.
              C sucks on many levels also.

              Comment



              • Originally posted by cynical View Post
                I speak Polish, and what's interesting is that many parts of the language are very logical and consistent compared to English, but in other ways, there are things in English that make more sense. (as an example for Polish, if you can read it, you can pronounce it. There are no silent or changing sounds)
                Yeah. While English's grammar is pretty clean and regular, the Norman Conquest, the Great Vowel Shift, and using a writing system with too few symbols have not been kind to English's spelling and pronunciation.

                Comment


                • C sucks on many levels also.
                  All languages suck on many levels x'D

                  Comment


                  • Originally posted by Weasel View Post
                    auto is not int32, in this case it would be just int. It is also a good keyword because it tells you the type is automatically deduced, unlike crap like "let".
                    Clearly you still don't understand what let is for. Maybe re-read my last post.

                    Originally posted by Weasel View Post
                    I don't know Rust that well but it seems it defaults to i32?
                    Nope, it defaults to Integer. The real bytes count is determined via the rest of the code. I.e. if you multiply your constant by 5i64, then the result the compiler would assume you meant a 64bit integer.

                    Originally posted by Weasel View Post
                    In C++ you'd know since a numeric 5 is int, if you wrote 5UL it would be unsigned long, etc.
                    Yes, that's one of the problems I recently had with C++ in the context of tests and template variants. I didn't find a way to reliably create a 32 bit constant on any platform C++ supports, without using a static cast.

                    Originally posted by Weasel View Post
                    Also, stop using const examples? You're intentionally using a default over a non-default to prove an invalid point
                    No, I only corrected what was posted before. I don't try to prove anything. I'm trying to explain.

                    Originally posted by Weasel View Post
                    Huh?
                    Code:
                    typedef int32_t i32;
                    at the top of your core header that everything else includes.

                    Yeah very "difficult".
                    Yeah, but how is int32_t defined? That's what I was talking about and what I call difficult. For some nonsense reason, the standard types of C and C++ have only minimum guarantees and not a fixed size. That's a constant source of errors i.e. when serializing/deserializing stuff.

                    Originally posted by Weasel View Post
                    Then you code the wrong way. They're called variables for a reason, not constants.
                    The rest of the world doesn't agree with you. Please read the core guidelines again.


                    Originally posted by Weasel View Post
                    It obviously means multiplication, given the space (or lack of) between the arguments.
                    I don't even know where to begin...



                    Comment


                    • Originally posted by oleid View Post
                      Nope, it defaults to Integer. The real bytes count is determined via the rest of the code. I.e. if you multiply your constant by 5i64, then the result the compiler would assume you meant a 64bit integer.
                      However, if there are insufficient constraints to pin it down to a specific integer type, it will default to i32 because that's generally the most performant choice.

                      Comment

                      Working...
                      X