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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,ac4955b8006bd13c X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,CP1252 Received: by 10.68.238.65 with SMTP id vi1mr10549931pbc.7.1338817060697; Mon, 04 Jun 2012 06:37:40 -0700 (PDT) Path: l9ni20008pbj.0!nntp.google.com!news2.google.com!postnews.google.com!x21g2000vbc.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Q: type ... is new String Date: Mon, 4 Jun 2012 06:36:31 -0700 (PDT) Organization: http://groups.google.com Message-ID: <82defba0-2d39-4418-b678-ebbefeb105d7@x21g2000vbc.googlegroups.com> References: NNTP-Posting-Host: 195.182.34.254 Mime-Version: 1.0 X-Trace: posting.google.com 1338816991 19845 127.0.0.1 (4 Jun 2012 13:36:31 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 4 Jun 2012 13:36:31 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: x21g2000vbc.googlegroups.com; posting-host=195.182.34.254; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1,gzip(gfe) Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Date: 2012-06-04T06:36:31-07:00 List-Id: On 4 Cze, 13:39, Brian Drummond wrote: > Now it seems to me that he would be better off saying > "type UnsafeString is new String;" > and bypassing the rest of that (rather long) article entirely. Except that it would not work in the language that he used for presentation (which is VBScript, I guess). > Or am I missing something in that article? Yes, this: "Let=92s pretend that you=92re building some kind of a web-based application [...]" The author describes a problem in a well-defined domain (web-based apps written in some dynamically-typed language similar in nature to VBScript) and presents a possible solution. Given the constraints, the solution he proposed is probably the best he could do. Like it or not, for many people switching to Ada is not a viable solution. Having said that, I agree that most of the security problems that plague the web-development ecosystem could be solved with a proper type system and static type-safety. -- Maciej Sobczak * http://www.msobczak.com * http://www.inspirel.com