Proposal: Function declaration with keyword

Georg Wrede georg at nospam.org
Mon Apr 14 08:50:45 PDT 2008


Bill Baxter wrote:
> Georg Wrede wrote:
>> Bill Baxter wrote:
>>> boyd wrote:
>>>
>>>> The chances of this feature from happening depends on whether this 
>>>> proposal appeals to the ideas of the designers of D, and partly on 
>>>> what the D community thinks of it. So, there's really no telling 
>>>> what kinds of odds we're dealing with here.
>>>
>>> After you've observed Walter's behavior for a year or so, you start 
>>> to get a feel for what he will or will not go for.  In my opinion, 
>>> based on Walter's track record, he's not going to break with C 
>>> tradition just to slightly improve readability.  He's hunting for 
>>> features that that will enable paradigm shifts.
>>>
>>> And he has an irrational fear of all things Pascal.  :-)
>>
>> Mmmmpppghhhhh.....fffff........................
> 
> I don't get it.

Well, it was an entertaining and funny remark, but I decided not to 
laugh. :-)

> But actually I take it back, Walter doesn't have an irrational fear of 
> Pascal.  What he's said in the past (most recent I recall was discussion 
> of using "var" instead of "auto") is that some people hate Pascal so 
> much that they will shun a language if it even *reminds* them of Pascal.

That certainly was the case in the old times. Until Borland introduced 
Turbo Pascal, the language was hateable. And somehow that stigma has 
stuck in certain circles, especially with people who've never really 
acquainted themselves with Borland Pascal. Ok, Pascal was an academic 
language, solely designed to teach Good Programming, but still, trying 
to use it in real life (which obviously happens -- who'd want to spend 
years at the university learning a language, and then not try to solve 
one's problems with it), was problematic. For example handling console 
IO or files. Oh, and compilers used to cost upwards of $1000, but TP 
cost only $99, with a money-back guarantee, /and no/ copy protection. 
Total blasphemy!

And advocates in the academia took exception to Borland's way of 
resolving such issues. At the same time, regular people were 
exhilarated. Now one could really use Pascal in pretty much every kind 
of programming tasks, and it was fun, and their compiler was simply 
unbelievably fast. At the time, compiling even a trivial example 
(actually in any language) took typically minutes, and Borland's 
compiler did even non-trivials in seconds! Plus, any runtime errors gave 
you an address value, which you could give to then IDE, which then 
brought you to the exact source line! And the academia shouted "that's 
not Real Pascal!"

Of course, Pascal isn't C, and Serious Systems Programming, bare metal 
stuff, and guru style pointer wizardry are, of course, easier in C. And 
C folks simply hated BEGIN and END being used instead of {}, which made 
the language in their eyes look like kindergarten stuff. Including me, 
but otherwise I loved and still love the language. And I have to thank 
Borland for getting me into serious programming at all.

Besides, until about a year ago, you could do virtually anything you 
could do in D, in Borland Pascal, without much tweaking or extra effort. 
When we made a comparison table, it was a surprise to Walter that the 
difference in Yes boxes was so small. The biggest difference was 
actually the lack of GC.

If I had to write an operating system from scratch, and the choices 
given to me were D and Borland Pascal (in practice, that would be Free 
Pascal because I want a free as in beer language), I'd choose the 
latter, any day. Today, D is good for "regular programming", but Real 
Systems Work, I'm sorry to say, is not here yet with D. GC is one 
reason, runtime library dependencies and non-modularity are another. But 
I'm sure we're getting there.



More information about the Digitalmars-d mailing list