Re: (long) An AES implementation for 32-bit platforms

From: Richard Heathfield (dontmail_at_address.co.uk.invalid)
Date: 06/12/03


Date: Thu, 12 Jun 2003 21:13:28 +0000 (UTC)

Mok-Kong Shen wrote:

>
>
> Richard Heathfield wrote:
>>
>> Mok-Kong Shen wrote:
>>
>> <snip>
>> >
>> > O.k. Would it be C for a programmer that uses a C compiler
>> > that doesn't accept // as the comment symbol (as in
>> > your case with the 'conforming' mode)?
>>
>> I can't parse this.
>
> O.k. It isn't very well written. Would a programmer who
> uses a C compiler, which doesn't accept // as the comment
> symbol (like in your case with the 'conforming' mode set
> for a C++ compiler), consider my code to be a C code?
> Is this understandable?

Yes, that's more readable. Your style takes no advantage of significant C++
features (STL, classes, iostreams, etc).

> (BTW, although I use VC++, I must admit that I don't
> have experience in setting conforming mode to reder it
> to be a strict C compiler. Hence I have never tested
> strict C conformance. On the other hand, I think that
> nowadays employing C++ instead of C doesn't pose any
> practical problems, as also said previously.)

It depends how generally useful you wish your code to be, since C is
supported on more platforms than C++.

>> Bottom line: the code you posted was neither valid C nor valid C++. Deal
>> with it.
>
> I suppose you are nit-picking.

Welcome to Usenet.

<snip>

-- 
Richard Heathfield : binary@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton


Relevant Pages

  • RE: not using strict problems
    ... > To: Beginners Perl ... > use strict in his code where by I do. ... And I'm a very novice programmer. ... "Any job that is worth doing is worth doing right, ...
    (perl.beginners)
  • Re: weird math
    ... > I am writing a program to parse a CSV file downloaded from my bank. ... 'strict' and 'warnings' are lexically scoped so they won't be effective ...
    (perl.beginners)
  • Re: Seek positioning
    ... programmer would do differently. ... use strict; ... use warnings; ... print Dumper $data; ...
    (perl.beginners)
  • Re: variable declaration, was RE: moving to the next line
    ... > Several people on this list have discouraged the habit. ... As a Perl programmer, I do tend to declare at first usage, but I ... Without strict, I'd be bald as a cue-ball from tearing my hair out ...
    (perl.beginners)
  • RE: not using strict problems
    ... I have a problem whereby another new programmer ... Another short-term solution is to turn off strict in the script ...
    (perl.beginners)

Quantcast