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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Hadrien G." Newsgroups: comp.lang.ada Subject: Re: Writing Linux Kernel Modules in Ada Date: Sat, 29 Oct 2016 16:11:05 +0200 Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: u63zmjDel8WfRW5eHvpjHw.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:32198 Date: 2016-10-29T16:11:05+02:00 List-Id: Le 29/10/2016 à 04:19, Coyo T Stormcaller a écrit : > artium@nihamkin.com wrote: > >> I am experimenting with writing Linux kernel modules in Ada and document >> my attempts. >> >> Thought some here would be interested to read about this: >> >> http://www.nihamkin.com/2016/11/23/writing-linux-modules-in-ada-part-1/ >> >> https://github.com/alkhimey/Ada_Kernel_Module_Toolkit >> >> >> Any kind of criticism is welcomed. > > This is a fascinating concept. It would make sense, given how security and > stability focused Ada is. I wonder how Ada and Rust would compare on various > aspects. > I would say that Rust is a relatively recent newcomer in the large family of languages that try to remain C-like while addressing the main flaws of C and C++, and bringing a couple of nice functional features from ML along the way, whereas Ada has a more original take on language design. For an example, consider integer types. In Rust, you are expected to use signed or unsigned integer types with power-of-2 sizes ranging from 8 bits to 64 bits. To a C99/C++11 developer, that's nothing new: they essentially took the sized int types from stdint.h and made them the default because they are much more portable than the legacy short/int/long trio. In contrast, Ada tried to go further by decoupling the interface of integers from their implementation. When you define an integer type in Ada, you specify its range and leave it up to the implementation to decide which machine type will be used. This design leaves more room for hardware-specific compiler optimizations, like C's legacy short/int/long types, while still remaining perfectly portable. Cheers, Hadrien