Re: How to test if an enum is inside a set
From: Alexander Muylaert (Remove_amg_at_pandora.be)
Date: 06/08/04
- Next message: Elp: "Catching every unhandled exception?"
- Previous message: Jon Skeet [C# MVP]: "Re: Sharing encrypted data with .Net?"
- In reply to: Beeeeeves: "Re: How to test if an enum is inside a set"
- Next in thread: Alexander Muylaert: "Re: How to test if an enum is inside a set"
- Reply: Alexander Muylaert: "Re: How to test if an enum is inside a set"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 8 Jun 2004 21:43:05 +0200
> IOW, the inventor(s) seem(s) to have pandered
> to the whims of users who want to write "nice" looking code,
> not how it is designed to be easy for the compiler (to optimize)
> aswell as to code.
Euh, you're joking right? What is the difference of "begin" or "{" as token
for the optimizer?
begin
DoThing();
end;
{
DoThing();
}
Honestly, if you believe that the first syntax is less optimizable then the
second, then I can advise you a great book of Steven S. Muchnick. Advanced
compiler design. Perhaps the parses looses some ticks because the tokens in
pascal are multicharacter. But, trust me, your cpu doesn't care if you
assigned with a := or with a =. MOV is MOV and that's it.
btw, are you aware that Delphi is a 1 pass compiler where as C/C++ are two
pass compilers.
It is true, that delphi doesn't allow you to write something like this
if (MyTempVar = (++Counter++ == 5)) {
Counter += ++MyTempVar-- != 2;
}
Perfectly valid syntax in C/C++. But I think it is safely to say that even
a C-die-hard manager would fire any guy that codes this way. I like pascal
since it forces you to use multiple statements. It keeps code easier to
track.
But, apart from the syntax. Delphi has some really nice features I miss in
C# and vica versa.
Kind regards
Alexander
- Next message: Elp: "Catching every unhandled exception?"
- Previous message: Jon Skeet [C# MVP]: "Re: Sharing encrypted data with .Net?"
- In reply to: Beeeeeves: "Re: How to test if an enum is inside a set"
- Next in thread: Alexander Muylaert: "Re: How to test if an enum is inside a set"
- Reply: Alexander Muylaert: "Re: How to test if an enum is inside a set"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|