Loading ...
Sorry, an error occurred while loading the content.

Re: [hackers-il] Dereference by XOR?

Expand Messages
  • adi@stav.org.il
    ... With all of its problems, Pascal has gotten one thing right: a post-order dereference operator (not that this suggested feature fixes it). C has p[0], of
    Message 1 of 14 , Nov 2, 2004
    • 0 Attachment
      Quoting Gadi Evron <ge@...>:

      >
      > Adi Stav wrote:
      > > On Sat, Oct 30, 2004 at 09:50:05AM +0200, Ori Idan wrote:
      > >
      > >>>caret operator ("^") in place of asterisk operator
      > >>>("*")
      > >>>for pointer dereferencing.
      >
      > > Why, the feature looks quite nice to me.
      >
      > I have to admit that regardless of this being good, or bad - it reminds
      > me of high-school and Turbo Pascal. Not a pretty sight.

      With all of its problems, Pascal has gotten one thing right: a post-order
      dereference operator (not that this suggested feature fixes it). C has p[0], of
      course, but it's not a pretty sight, either.

      ----------------------------------------------------------------
      This message was sent using IMP, the Internet Messaging Program.
    • omer mussaev
      Pardon my ignorance, but what s post-order dereference operator and how is it different from dereference using asterisk operator? ... ===== -- o.m.
      Message 2 of 14 , Nov 2, 2004
      • 0 Attachment
        Pardon my ignorance, but what's post-order dereference
        operator and how is it different from dereference
        using
        asterisk operator?

        --- adi@... wrote:

        > Quoting Gadi Evron <ge@...>:
        >
        > >
        > > Adi Stav wrote:
        > > > On Sat, Oct 30, 2004 at 09:50:05AM +0200, Ori
        > Idan wrote:
        > > >
        > > >>>caret operator ("^") in place of asterisk
        > operator
        > > >>>("*")
        > > >>>for pointer dereferencing.
        > >
        > > > Why, the feature looks quite nice to me.
        > >
        > > I have to admit that regardless of this being
        > good, or bad - it reminds
        > > me of high-school and Turbo Pascal. Not a pretty
        > sight.
        >
        > With all of its problems, Pascal has gotten one
        > thing right: a post-order
        > dereference operator (not that this suggested
        > feature fixes it). C has p[0], of
        > course, but it's not a pretty sight, either.
        >
        >
        ----------------------------------------------------------------
        > This message was sent using IMP, the Internet
        > Messaging Program.
        >


        =====
        --
        o.m.

        __________________________________________________
        Do You Yahoo!?
        Tired of spam? Yahoo! Mail has the best spam protection around
        http://mail.yahoo.com
      • adi@stav.org.il
        ... It isn t. It s just a different syntax. In Pascal you do p^: where in C you would *p . In C, almost any dereference that is part of a larger expression
        Message 3 of 14 , Nov 2, 2004
        • 0 Attachment
          Quoting omer mussaev <eomer_mussaev@...>:


          > Pardon my ignorance, but what's post-order dereference
          > operator and how is it different from dereference
          > using
          > asterisk operator?

          It isn't. It's just a different syntax. In Pascal you do "p^: where in C you
          would "*p". In C, almost any dereference that is part of a larger expression
          needs to be parenthesized. This is why K&R added the -> hack, which solved only
          part of the inconvenience. In Pascal you simply do "p^.member".

          ----------------------------------------------------------------
          This message was sent using IMP, the Internet Messaging Program.
        • Ori Idan
          ... I would say it means: In the next version of C-runtime library you will not be able to run or write software that we don t want you to . -- Ori Idan
          Message 4 of 14 , Nov 2, 2004
          • 0 Attachment
            Oleg Goldshmidt wrote:

            >
            >omer mussaev <eomer_mussaev@...> writes:
            >
            >
            >
            >>According to MSDN, new release of C++ compiler be
            >>extended with new syntax. MSDN refers to the new
            >>syntax as C++/CLI and mentions that it undergoes
            >>standartization efforts.
            >>
            >>
            >
            >Huh, I was surprised to learn that CLI was "Common Langiage
            >Interface". I thought it was some other interface... ;-)
            >
            >
            >
            >>The new syntax will introduce (among other things) the
            >>
            >>caret operator ("^") in place of asterisk operator
            >>("*")
            >>for pointer dereferencing.
            >>New syntax will refer to handles to
            >>garbage-collected memory, while the old syntax will
            >>refer to pointers by user-managed memory.
            >>
            >>
            >
            >I suppose they can avoid confusion with the binary XOR - this will
            >always be unary - just like the dereference asterisk is not confused
            >with multiplication. However, I wonder how I can use this extension
            >while keeping the application both portable and spaghetti-free. While
            >other GC-related stuff such as "gcnew" can be preprocessed carets
            >cannot.
            >
            >
            >
            >>I assume I will have a tough time recognized a language I like in
            >>near future...
            >>
            >>
            >
            >"I don't know what the language will look like in 50 years but it will
            >be called Fortran"?
            >
            >It is not necessarily a bad thing - that is how language standards
            >evolve: vendors introduce extensions, some of these prove useful, are
            >implemented by other vendors, and get into standards. Hopefully,
            >patenting such things will be counter-productive because vendors are
            >usually interested in getting their stuff into standards.
            >
            >Does anyone else find this sentence:
            >
            >"Second, a new version of the C-runtime library (CRT) with enhanced
            >security features will be released with Visual C++ 2005. As part of
            >Microsoft's ongoing commitment to the Trustworthy Computing
            >initiative, this release of the CRT will help increase the collective
            >security of applications that integrate the CRT."
            >
            >amusing? [My interpretation: "our current implementation of C has
            >buffer oveflows and other holes all over the place..."]
            >
            >
            >
            I would say it means: "In the next version of C-runtime library you will
            not be able to run or write software that we don't want you to".

            --

            Ori Idan
          Your message has been successfully submitted and would be delivered to recipients shortly.