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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,80ae596d36288e8a X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news3.google.com!feeder.news-service.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!212.27.60.9.MISMATCH!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Tue, 24 May 2011 12:00:24 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Why no socket package in the standard ? References: <872169864327910446.796089rmhost.bauhaus-maps.arcor.de@news.arcor.de> <9cb23235-8824-43f4-92aa-d2e8d10e7d8c@ct4g2000vbb.googlegroups.com> <4ddb5bd7$0$302$14726298@news.sunsite.dk> In-Reply-To: <4ddb5bd7$0$302$14726298@news.sunsite.dk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-ID: <4ddb81b8$0$7628$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 24 May 2011 12:00:24 CEST NNTP-Posting-Host: 7805f263.newsspool1.arcor-online.net X-Trace: DXC=5\n@Qbkah<0_A0jCfgHO6>ic==]BZ:af>4Fo<]lROoR1<`=YMgDjhg2\M8Q7Z_Bh2=nc\616M64>:Lh>_cHTX3j=0diMYRSgj04 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:19402 Date: 2011-05-24T12:00:24+02:00 List-Id: On 24.05.11 09:19, Thomas Løcke wrote: > On 05/24/2011 09:07 AM, Maciej Sobczak wrote: >> Java, C# (.NET), Python, etc. are easy examples of more or less recent >> languages that support sockets in their standard libraries. > > > And, for what it is worth, PHP. and Pike [*], (and CSNOBOL-4 [**]), and anything supported by SWIG, and Haskell [***] and ... 1. The reason simply is that each and every of them has started by offering some glue code for the BSD/POSIX socket functions. .NET languages will likely just use a .NET class. But there have been and will be difficulties when porting the languages' alleged "standard" libraries to non-POSIX (or non-.NET) operating systems. Perhaps the difficulties are even conceptual ones whenever POSIX sockets don't really meet the networking requirements. Define Commercially_Important_Platforms := { ∃ target | POSIX(target) IN { False, True } } How large is the subset defined by POSIX(target) = False? Is POSIX/Sockets the best Ada solution when this is the case? 2. In the light of Ada's history regarding standardization, there is, I believe, networking knowledge that warrants more than canonization of a practical workaround---which might fail if requirements are actually different. Opposing a get-that-duct-tape-solution-out–the-door style for standardization, I'd imagine starting from questions like the following and then weigh POSIX sockets as the possible answer: - What should programs be able to do when communicating data along some network connection? - Should there be a layered approach? How much detail? - Where in the language will this integrate nicely? (E.g. package structure? What types if any? Or anything that has already been mentioned.) - Is sockets the right approach? Consider Erlang! - Is sockets the right approach? Consider a CAN! I doubt that the best answer to these questions can be summed up by saying, "Mirror Posix sockets!". ___ [*] http://pike.ida.liu.se/generated/manual/modref/ex/predef_3A_3A/Stdio/Port.html [**] http://www.snobol4.org/csnobol4/curr/doc/snobol4.html [***] "Haskell's networking functions almost always correspond directly to familiar C function calls." http://book.realworldhaskell.org/read/sockets-and-syslog.html