Related articles |
---|
Re: Optimization techniques david.brown@hesbynett.no (David Brown) (2019-04-25) |
Re: Optimization techniques 847-115-0292@kylheku.com (Kaz Kylheku) (2019-04-26) |
Re: Optimization techniques david.brown@hesbynett.no (David Brown) (2019-04-28) |
Re: Optimization techniques and runtime checks DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2019-04-29) |
Re: Optimization techniques and runtime checks david.brown@hesbynett.no (David Brown) (2019-05-07) |
Re: Optimization techniques and runtime checks DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2019-05-08) |
Re: Optimization techniques and runtime checks david.brown@hesbynett.no (David Brown) (2019-05-08) |
Re: Optimization techniques and runtime checks bc@freeuk.com (Bart) (2019-05-08) |
Re: Optimization techniques and runtime checks DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2019-05-08) |
Re: Optimization techniques and runtime checks david.brown@hesbynett.no (David Brown) (2019-05-08) |
Re: Optimization techniques and runtime checks bc@freeuk.com (Bart) (2019-05-09) |
Re: Optimization techniques and runtime checks david.brown@hesbynett.no (David Brown) (2019-05-09) |
[3 later articles] |
From: | Hans-Peter Diettrich <DrDiettrich1@netscape.net> |
Newsgroups: | comp.compilers |
Date: | Wed, 8 May 2019 02:27:36 +0200 |
Organization: | Compilers Central |
References: | <72d208c9-169f-155c-5e73-9ca74f78e390@gkc.org.uk> 19-04-021 19-04-023 19-04-037 19-04-046 19-05-052 |
Injection-Info: | gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="98816"; mail-complaints-to="abuse@iecc.com" |
Keywords: | arithmetic, standards, comment |
Posted-Date: | 07 May 2019 22:57:06 EDT |
Am 07.05.2019 um 16:29 schrieb David Brown:
> On 29/04/2019 22:36, Hans-Peter Diettrich wrote:
>> Am 28.04.2019 um 23:49 schrieb David Brown:
>>> This is exactly the same as mathematics. The "square root" function,
>>> for real numbers, is defined for non-negative numbers. If someone asks
>>> you for "sqrt(-4)", then the question is meaningless. Any answer given
>>> can be considered incorrect - equally, any answer given can be
>>> considered correct.
>>
>> That's a cheap excuse for poor language design, aimed at sloppy compiler
>> implementation.
>>
>
> You are saying that mathematics is a poor language design?
No, I criticize the lack of restricted (non-negative...) types for such
purposes.
> Different languages have different purposes and trade-offs. This is
> important to accept when discussing them.
No doubt :-)
So I wonder why the topic (optimization...) drifted into a discussion of
almost only the C language.
I also wonder where runtime efficiency nowadays is really so important,
that safety and security breaches are considered acceptable?
> Every language has its oddities, and there are always things that some
> people thing are terrible design. For example, it is truly weird that
> "const x : int = 10;" is one of Delphi's way of making "x" a variable
> with an initialised value. (In older Delphi, it was the only way!)
This makes the different evolution visible:
Pascal started as a tutorial language, C as a production language.
Evolution added features of great demand - in the case of Pascal many
features had to be added to Wirth's academic language(s) before it
became usable outside education.
I definitely prefer a safe language, which can be tuned later for
efficieny. Lowering requirements and checks in specific parts of a
program is doable and acceptable easier than introducing requirements
that were not anticipated in the basic language design.
DoDi
[These days I write just about everything in python. Occasionally
I'll rewrite something in C if python can't do it but that's pretty
rare. The python implementation everyone uses is written in C but it
does a pretty good job of managing storage and arithmetic. -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.