From nobody Tue Mar 28 19:01:20 2023 X-Original-To: freebsd-arch@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PmLCs0QwGz42Mfg for ; Tue, 28 Mar 2023 20:01:13 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PmLCr6TX0z4Cgs; Tue, 28 Mar 2023 20:01:12 +0000 (UTC) (envelope-from hps@selasky.org) Authentication-Results: mx1.freebsd.org; none Received: from [10.36.2.154] (unknown [46.212.121.255]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 75D6F2609C7; Tue, 28 Mar 2023 22:01:11 +0200 (CEST) Message-ID: Date: Tue, 28 Mar 2023 21:01:20 +0200 List-Id: Discussion related to FreeBSD architecture List-Archive: https://lists.freebsd.org/archives/freebsd-arch List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arch@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: Blocks runtime in the kernel Content-Language: en-US To: Justin Hibbits , Konstantin Belousov Cc: John Baldwin , Brooks Davis , freebsd-arch@freebsd.org References: <20230316100611.4892008c@gonegalt.net> <0f19b708-c167-b05e-1b0d-e4c1029a50c4@FreeBSD.org> <20230328154356.7130e4e0@gonegalt.net> From: Hans Petter Selasky In-Reply-To: <20230328154356.7130e4e0@gonegalt.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4PmLCr6TX0z4Cgs X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 3/28/23 21:43, Justin Hibbits wrote: > On a side note, a friend of mine would love to see C++ in the kernel, > but that's a discussion for another day. Hi, I've never used blocks before, but it kind of gets me thinking about C++ templates. Can't you just use static inline functions, and the compiler will insert and optimise the code for you? Or make some macros to generate foreach functions doing various simple things? Personally, it took many years before I grasped all of C++ . I'm worried that blocks is one of those features that look nice, but have strange corners and require more from code analysis. For example if you do static code analysis and use blocks, will the static code analysis tool be completely lost? What about services like coverty? Do they find bugs hidden when using blocks? --HPS