From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.ams3.giganews.com!border2.nntp.ams3.giganews.com!border2.nntp.ams2.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!weretis.net!feeder4.news.weretis.net!gandalf.srv.welterde.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Weaker typing as a part of the way to stronger typing? (Was: Seeking for papers about tagged types vs access to subprograms) Date: Tue, 14 May 2013 14:08:15 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <17ceq51ydy3s0.s94miqqzbg5w.dlg@40tude.net><1vrhb7oc4qbob$.q02vuouyovp5$.dlg@40tude.net><19lrzzbgm77v6.1dzpgqckptaj6.dlg@40tude.net> <1bfhq7jo34xpi.p8n2vq6yjsea.dlg@40tude.net><12gn9wvv1gwfk.10ikfju4rzmnj.dlg@40tude.net> <871u99ohk7.fsf_-_@adaheads.sparre-andersen.dk> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: loke.gir.dk 1368558496 6416 69.95.181.76 (14 May 2013 19:08:16 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 14 May 2013 19:08:16 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Original-Bytes: 3831 Xref: number.nntp.dca.giganews.com comp.lang.ada:181638 Date: 2013-05-14T14:08:15-05:00 List-Id: "Jacob Sparre Andersen" wrote in message news:871u99ohk7.fsf_-_@adaheads.sparre-andersen.dk... > Randy Brukardt wrote: >> Dmitry A. Kazakov wrote: > > [ Nothing whatsoever about access to subprograms. - Please update the > subject line to match what you are writing about. It makes it much > easier for everybody to follow you. ] > >>> Weak typing is better? >> >> Yes, because we need to move beyond typing to other forms of static >> error detection. Typing is too rigid to do a good job -- you need to >> include statically known information about the contents of variables >> and parameters, which can change from line-to-line in a program. > > Considering that SPARK on one level is rather un-typed (all numbers seem > to be equivalent on the constraint error checking level of SPARK), you > may be onto something. But how would avoid making a monster like Java, > where programmers can use weak types everywhere (except as the main > subprogram). > >> I want checking that is *stronger* than what can be provided by >> statically applied types. Trying to get it by extending the type model >> directly is madness, especially as it makes sharing much less >> possible. > > Might be right. But how would you separate operations on the > representation level from operations on the typed ("profile") level? I don't think there are any operations on the representation level (well, maybe a small number, like the predefined numeric operations in Ada). I would guess that such operations would have an empty profile (meaning they're always applicable), while most operations would have profiles that would restrict their applicability. In any case, these are the questions for a new language design. If they are already clearly answered, we wouldn't need a new language! Randy.