Does functional programming work?
grauzone
none at example.net
Sun Jan 3 23:48:40 PST 2010
Walter Bright wrote:
> retard wrote:
>> Fri, 01 Jan 2010 12:19:25 -0800, Walter Bright wrote:
>>> When I then picked up K+R C, I never wrote another line of Pascal. It so
>>> soured me on Pascal that I never got on the later bandwagons of Modula
>>> II, Delphi, TurboPascal, etc. Never even looked at them.
>>
>> The programming-language-as-religion problem exists only in your
>> imagination. I fail to see Pascal as a religion. I don't know what the
>> pure Pascal compiler you're talking about is, but ordinary Pascal is
>> just another procedural systems programming language like C. It has a
>> bit different syntax ("begin end" vs "{}" and so on), somewhat
>> different rules for some default data types, but it's more or less C
>> wrapped in a syntactic mask.
>
> Pick up a copy of "Pascal User Manual and Report." That's pure Pascal.
> It's also quite useless. Your program has to be all in one file, for
> instance. For another, writing I/O always appends a newline. Try writing
> binary files with that. There was no way to get at the bit
> representation of a type. Etc.
That's all gone in modern Pascal dialects. Delphi is very similar to D;
it's practically a Pascal version of D. The OOP features are the same,
except for some small differences, which make Delphi a bit more flexible
(virtual and named constructors...).
The only thing that was really lacking in Delphi are templates. But for
compensation, it had powerful RTTI. Try writing a
reflection/serialization mechanism in D that's as powerful Delphi's. I
bet you won't succeed, not even with D2. (Need to fix some compiler bugs
or deficiencies in the area of __traits first.) Even if you succeed, the
end result will be probably harder to use. (If that sounds polemic, show
me a D library that implements full serialization on
Delphi/Java/whatever level, and I'll shut up.)
More information about the Digitalmars-d
mailing list