Re: Attn Huw
- From: "Peter Morris [Droopy eyes software]" <pete@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 18 Jun 2006 01:28:25 -0700
Hi Huw
My remarks about your Pascal comments were merely that they were inaccurate.
However you did say that the for loop in C# has a complex format, when
really you should have been using the most appropriate loop for the job
(foreach). I felt that you were
1) Showing as close a mapping from Ruby as possible rather than showing how
someone would *really* write code in the target language.
2) Inaccurate in your Pascal statement (but that was just me pointing out
incorrect information)
3) Using a different type of output for the other languages which made them
look more complicated
If I were writing a proper program, that would of course be the case. If
it is my intention to show syntax differences between multiple languages,
in a feature about a particular language (in this case, Ruby) this
question does not arise.
But that's exactly what part of your article did. It showed how the same
code would be implemented in different languages. I felt that your
implementations were unfair though and painted C# especially in a much worse
light than it deserved.
If Ruby provided me with the option of using a text box/memo I would have
done so. As I say, this was a boxout showing syntax differences. It was
not a practical tutorial on converting code ;-)
Ruby doesn't provide a textbox or memo so you wrote to the standard output
device, but C# and Delphi both have output to standard output device too and
yet you chose to write (something like)
textBox1.Text += names[i] + "\r\n";
instead of
Console.WriteLine(name); //using the foreach
and
Memo1.Lines.Add(Names[I]);
instead of
WriteLine(Name); //using for..in
The results of the code were different and therefore not an accurate
comparison. I cannot understand why a more complicated example would be
used in order to produce a different application when the code to produce
the same application is both smaller and more readable. In honesty it does
look like a sneaky trick to say "Look how great this bit of Ruby code is
compared to X and Y".
What I find odd, however, is that you believe I am laoding "comparisons in
the favour of Ruby just to make it look more favourable"
I am sure that you are aware of "foreach" and "for in". I am also sure that
you are aware of "Console.WriteLine" and "WriteLn". Why you avoided these
less space consuming and more readable approaches in favour of code that was
more verbose and complicated I do not know, if I didn't know C# I would
think "That looks much more complicated!"
It had not occurred to me that this could be taken as critical of Pascal.
Quite the reverse.
As I said, my criticism was about C#, I was just pointing out an inaccuracy
in the Pascal code. In fact I think the Pascal code is more verbose because
there is no way to initialise a local array variable on a single line as
there is in Ruby and C#. It's certainly a feature I would like to see.
Your suggestion that I am uncritical of Ruby is far off the mark.
Actually I didn't suggest you don't criticise it. I was suggesting that you
were favouring it in an unfair comparison.
I honestly am baffled by your objections.
I hope it is clear now? I didn't feel your comparisons were fair, and I
know that the differences weren't because you don't know how to write code
in the languages compared. The only correct comparison is a fair one!
Regards
Pete
.
- References:
- Attn Huw
- From: Peter Morris [Droopy eyes software]
- Re: Attn Huw
- From: Huw Collingbourne
- Attn Huw
- Prev by Date: Re: Missing Win64 and Unicode support
- Next by Date: Re: Conference This Year
- Previous by thread: Re: Attn Huw
- Next by thread: Re: Attn Huw
- Index(es):
Relevant Pages
|
|