From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yA+VOP3BHmapGwAAqHPOHw:P1 (envelope-from ) for ; Tue, 16 Apr 2024 20:22:54 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id yA+VOP3BHmapGwAAqHPOHw (envelope-from ) for ; Tue, 16 Apr 2024 20:22:54 +0200 X-Envelope-To: patches@johnnyrichard.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lists.sr.ht header.s=20240113 header.b=WWsIBsjb; dkim=pass header.d=johnnyrichard.com header.s=key1 header.b=zJ4qRqh4; spf=pass (aspmx1.migadu.com: domain of lists@sr.ht designates 46.23.81.152 as permitted sender) smtp.mailfrom=lists@sr.ht; dmarc=pass (policy=quarantine) header.from=johnnyrichard.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=johnnyrichard.com; s=key1; t=1713291773; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=gDQzsikfXbFmwpkk7ncAvAOZ9ahdZUmAEudaVFjeN6Q=; b=WpX02CW8bwAjsvntbiQpRgGwSUrnYQaA2DfUdfYNDM4CXRC5maIQ9HQCSizoEXdSxHPas9 8IqW0zBKNTSbq17B8nAmlHVcG92k9k0sANkBX1+hTw8O9rbbch9xUkZ6dk5u3t+TWlU3w4 tasGk6zUisBYiPp5zPFCKT4ROWCBiKHuBjhpE5Cb7BsZBxo9CujUbwcddv6+tzhQMteRRW +bA/klcMWV0cbhZ+5kecCcUrL6ROSbBcjAB15dfCoz2ZE34NMC3fKkgkHHEzJ4V00nb2IL uwUzMKIhu5iO86cELhvQzHF9yRixCn/qvdmPFTPc4SKEcuU2IiUUwqjlrq7JOg== ARC-Seal: i=1; s=key1; d=johnnyrichard.com; t=1713291773; a=rsa-sha256; cv=none; b=WB5t1v8neE+tvLsGGPLhvfIB8FgiemzqodsWBjKNjNjTHK0OAGywAtf2/x30ctidhdDyAm ZxYpORaNYq0aqqyktgP0FieyOGOvgxWLwiF6wREZjPqgSQbWEJcERaAsmDr7YTHRZ+WXzX zQ1dB5NMAbIy3POTVN2zoK4ET0zjq2yoBM3O/4Q5H6Ix4Yppr7QC307TRsbLy/VbHmOIV6 YnQDBDCXhTk55fk/D3nLjMzF0Qn9AnV6RPOjqzUcDiwpG/ERoIMYIU5Kl5ZKjEWK4iXtV8 PKKxDJG9RCgJzAz83yOvasVoAxMWMaFdUZGdS+hYSZ3UXikZBsMlcZEo+dixgw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=lists.sr.ht header.s=20240113 header.b=WWsIBsjb; dkim=pass header.d=johnnyrichard.com header.s=key1 header.b=zJ4qRqh4; spf=pass (aspmx1.migadu.com: domain of lists@sr.ht designates 46.23.81.152 as permitted sender) smtp.mailfrom=lists@sr.ht; dmarc=pass (policy=quarantine) header.from=johnnyrichard.com Received: from mail-a.sr.ht (mail-a.sr.ht [46.23.81.152]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id CF8E432328 for ; Tue, 16 Apr 2024 20:22:53 +0200 (CEST) DKIM-Signature: a=rsa-sha256; bh=7jPpHGgxlB6Szl+5ea0lma/UHsKmLjmsV+NDPnDWFhE=; c=simple/simple; d=lists.sr.ht; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-Unsubscribe:List-Subscribe:List-Archive:List-Post:List-ID; q=dns/txt; s=20240113; t=1713291773; v=1; b=WWsIBsjb10yXpZnCXYJa+xCNLde5Em3cPTiiDg5n84GVaXQXn39/LvcM0AkPmyi+RpoZZ4Ul MdZ3lvztw9Oe3XTTiL5pYbgy/T754TEFTQosUAEgiQ7llNI9QD0EsJYUeQNd+5yTv6WU7UxIx7B 9D5V+YVEW8+esCBcQxBsMnddDzRz91qikfgd/TGhmph+CWJgRZtgNJVCsV6bliau/ZMzoHl9xgo oHlMX55lAbVHgFHFHBd9zbsAiliy7UP3jJWDjdyr1vvHWnU1BCynd0+CtoLa1iyPelhpdZDjBEc nQNLPufX285JR+gyeJ69/lbgJsM3B7haaEvwijyoeAI0A== Received: from lists.sr.ht (unknown [IPv6:2a03:6000:1813:1337::154]) by mail-a.sr.ht (Postfix) with ESMTPSA id 6A2A02016B for ; Tue, 16 Apr 2024 18:22:53 +0000 (UTC) Received: from out-177.mta1.migadu.com (out-177.mta1.migadu.com [IPv6:2001:41d0:203:375::b1]) by mail-a.sr.ht (Postfix) with ESMTPS id A2FEA20161 for <~johnnyrichard/olang-devel@lists.sr.ht>; Tue, 16 Apr 2024 18:22:52 +0000 (UTC) Date: Tue, 16 Apr 2024 21:20:57 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=johnnyrichard.com; s=key1; t=1713291772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gDQzsikfXbFmwpkk7ncAvAOZ9ahdZUmAEudaVFjeN6Q=; b=zJ4qRqh41G8Pdr3942g9JfDit+P62nkFhgrZT+/ZiKmer8iCoktja5dL7JS9eMXjkXfwFJ kPHoLitakxWxmPBiq0pp+hbknRp76KSGbS2GGxPYRed8sGPkdcx4J7Ai3L3wfc0XvXUc1P zssU0IZb4kQFpgiohDyYtI1qscjsgPIUKZ6ZAqOKRwjjJKEB4Ej3VWofgVJx20IRYoBG+0 VB12qRAIjIFK+yASnzDvV0J9o2NtqouvnKUcP36El8/Z63QgCyHmCx/aN3Idbqdq1Z2eOl FzZeHxOgWNT2kUzTuGJUmYxdT6OpcdIhbbcp8ZjkpeadDf8dBjaTgom1kc7J6w== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Johnny Richard To: Carlos Maniero Cc: ~johnnyrichard/olang-devel@lists.sr.ht, Ricardo Kagawa Subject: Re: [PATCH olang v1] spec: ebnf: add binary expressions Message-ID: <52aqozoevpqhucq67znjjbaqrpb65tubgc3yrp7isqo2x2bofz@ugtgrccjdkbb> References: <20240415184116.140292-1-johnny@johnnyrichard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Unsubscribe: List-Subscribe: List-Archive: Archived-At: List-Post: List-ID: ~johnnyrichard/olang-devel <~johnnyrichard/olang-devel.lists.sr.ht> Sender: ~johnnyrichard/olang-devel <~johnnyrichard/olang-devel@lists.sr.ht> X-Migadu-Flow: FLOW_IN X-Migadu-Country: NL X-Migadu-Spam-Score: -7.80 X-Spam-Score: -7.80 X-Migadu-Queue-Id: CF8E432328 X-Migadu-Scanner: mx12.migadu.com X-TUID: JMmVEiPo1sfv On Tue, Apr 16, 2024 at 12:33:58AM -0300, Carlos Maniero wrote: > I'd like to get your opinion: Is it really necessary to represent > precedence here? Some language specifications [1] chose to omit this > detail. I' more inclined to keep the spec as simple as possible, even if > it makes the behavior a bit unclear. I believe it's more important to > represent our grammar in the spec rather than precisely detail how > olang behaves. Alternatively, we could follow Go's approach; they kept > the spec simple and added explanatory text about the language's > behavior. > > But again, I just wanna an opinion here, I'm totally OK following the > spec you wrote, because I know that I suck at understanding the > precedence climbing method. :-) > > > [1]: Golang EBNF: https://go.dev/ref/spec#Expression / Rust EBNF: > https://web.mit.edu/rust-lang_v1.25/arch/amd64_ubuntu1404/share/doc/rust/html/grammar.html#binary-operator-expressions I think the language specification should address all gramma aspects of the language syntax, and precedence is a very fundamental part of the syntax. Being clear about the precedence rules in our grammar will prove its worth once we begin adding more features to our parser. Changing subject, if you are happy with this change and want to integrate it, I want to change the patch title to: docs: spec: add binary expressions I will appreciate a lot if you could make this change when applying the patch. Thanks for your review. <3