Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #1929

Re: functions as objects

From BGB <cr88192@hotmail.com>
Newsgroups comp.programming
Subject Re: functions as objects
Date 2012-07-09 11:02 -0500
Organization albasani.net
Message-ID <jtevf5$ud4$1@news.albasani.net> (permalink)
References (15 earlier) <ewl9hcehvgkr$.16lvi2o1wjjaq.dlg@40tude.net> <jtcu5d$4um$1@news.albasani.net> <1os9f4n3vg8kh$.jhpjt0z2tdrg.dlg@40tude.net> <jte5tt$268$1@dont-email.me> <13edwemesjwm2.5r3u5ialxl7h$.dlg@40tude.net>

Show all headers | View raw


On 7/9/2012 4:40 AM, Dmitry A. Kazakov wrote:
> On Mon, 9 Jul 2012 09:48:37 +0100, BartC wrote:
>
>> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message
>> news:1os9f4n3vg8kh$.jhpjt0z2tdrg.dlg@40tude.net...
>>> On Sun, 08 Jul 2012 16:27:35 -0500, BGB wrote:
>>
>>>> a language designer may also just declare everything inconvenient as
>>>> "undefined behavior" or "implementation defined" and call it "good
>>>> enough".
>>>>
>>>> what happens on overflow? undefined behavior.
>>>> what is the numeric tower? implementation defined.
>>>> what are and are not keywords? implementation defined.
>>>> will a conforming program actually work? implementation defined.
>>>
>>> Yes, this is how pitiful languages appear...
>>
>> Isn't your favourite language Ada? Even with Ada, all the above can be
>> issues that need to be considered.
>
> There is a difference between issues that *can be* and ones that always
> *are*.
>

this was meant more as an example than a real language.
however, some real-world languages, such as C, or ECMAScript, are not 
too far off.

C doesn't define what happens on overflow, but most implementations tend 
to interpret it as "silently overflow and wrap around".

C only really defines the 'names' of the types for the numeric tower, 
but leaves most other aspects as implementation defined (the 
common/established type sizes are a de-facto convention).

what things it does define tend to be taken fairly seriously though.

...


ECMAScript defines a numeric tower: 'double' only, whereas many 
implementations don't agree and implement different numeric towers.

likewise, ES does not put a strict limit as to what are and are-not 
keywords, and apart from some narrowly defined criteria, little can be 
said that a program written for one implementation will work on another.

many implementations seem to pick-and-choose which parts they want to 
implement, and some of the stuff that is specified in the standard is 
sufficiently brain-damaged that some of us would rather choose 
non-conformance instead.



meanwhile, I have a language which is on the border of "is" or "is not" 
an ECMAScript implementation (the core syntax is pretty much similar, 
but in many other regards the language differs).


>> However it seems such a pain to actually
>> program in it, or so expensive because of the time and expertise needed,
>> that the program might well not get written at all!
>
> You are misinformed. I lead large projects in both C++ and Ada. C++ is far
> more difficult. To learn at least some of the most dangerous C++ pitfalls
> takes years of practical experience. BTW, C++ RM is larger than Ada RM,
> while C++ does not cover tasking, does not have user-defined numeric types,
> does not support nested subprograms etc. But that is peanut comparing to
> the problems, when you, as I must, must make C++ software compilable by
> both MSVC, Borland C++, GCC, just this, not yet actually making it working
> and doing same things. And yet another catastrophe is looming on the
> horizon. We are planing to port our C++ software from 32 to 64 bit. The
> thing which, should we have written it in Ada would cost us virtually
> *nothing* but a compiler switch change, is a huge project of unpredictable
> budget for C++.
>

and meanwhile, a few years back I took Quake 2, a project consisting of 
in-all some rather dubiously written code (in a lot of places), and 
ported it to 64 bits, with little difficulty.

later, I ended going back mostly to building stuff as 32-bit on Windows, 
mostly as 32-bit Windows isn't really fully dead yet (and later dropping 
the Quake2 engine to be rid of the GPL).

Back to comp.programming | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

functions as objects bob <bob@coolfone.comze.com> - 2012-07-02 08:15 -0700
  Re: functions as objects Rui Maciel <rui.maciel@gmail.com> - 2012-07-02 17:42 +0100
  Re: functions as objects BGB <cr88192@hotmail.com> - 2012-07-03 14:56 -0500
    Re: functions as objects "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2012-07-04 09:28 +0200
      Re: functions as objects BGB <cr88192@hotmail.com> - 2012-07-04 10:08 -0500
        Re: functions as objects "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2012-07-04 18:12 +0200
          Re: functions as objects BGB <cr88192@hotmail.com> - 2012-07-04 14:02 -0500
            Re: functions as objects "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2012-07-04 22:20 +0200
              Re: functions as objects BGB <cr88192@hotmail.com> - 2012-07-04 19:42 -0500
                Re: functions as objects "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2012-07-05 11:30 +0200
                Re: functions as objects BGB <cr88192@hotmail.com> - 2012-07-05 10:33 -0500
                Re: functions as objects "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2012-07-06 10:50 +0200
                Re: functions as objects BGB <cr88192@hotmail.com> - 2012-07-06 08:32 -0500
                Re: functions as objects "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2012-07-06 16:45 +0200
                Re: functions as objects BGB <cr88192@hotmail.com> - 2012-07-06 10:48 -0500
                Re: functions as objects "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2012-07-07 21:28 +0200
                Re: functions as objects "BartC" <bc@freeuk.com> - 2012-07-08 16:33 +0100
                Re: functions as objects "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2012-07-08 18:20 +0200
                Re: functions as objects BGB <cr88192@hotmail.com> - 2012-07-08 16:27 -0500
                Re: functions as objects "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2012-07-09 09:35 +0200
                Re: functions as objects "BartC" <bc@freeuk.com> - 2012-07-09 09:48 +0100
                Re: functions as objects "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2012-07-09 11:40 +0200
                Re: functions as objects BGB <cr88192@hotmail.com> - 2012-07-09 11:02 -0500
                Re: functions as objects "BartC" <bc@freeuk.com> - 2012-07-08 16:34 +0100
                Re: functions as objects BGB <cr88192@hotmail.com> - 2012-07-08 16:11 -0500
                Re: functions as objects "BartC" <bc@freeuk.com> - 2012-07-08 23:35 +0100

csiph-web