public inbox for ~johnnyrichard/olang-devel@lists.sr.ht
 help / color / mirror / code / Atom feed
From: Johnny Richard <johnny@johnnyrichard.com>
To: Carlos Maniero <carlos@maniero.me>
Cc: ~johnnyrichard/olang-devel@lists.sr.ht,
	 Ricardo Kagawa <ricardo_kagawa@disroot.org>
Subject: Re: [PATCH olang v1] spec: ebnf: add binary expressions
Date: Tue, 16 Apr 2024 21:20:57 +0200	[thread overview]
Message-ID: <52aqozoevpqhucq67znjjbaqrpb65tubgc3yrp7isqo2x2bofz@ugtgrccjdkbb> (raw)
In-Reply-To: <D0L8C9D5VDC0.2OJQ38T0HUJMP@maniero.me>

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

  reply	other threads:[~2024-04-16 18:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-15 18:20 Johnny Richard
2024-04-15 17:43 ` [olang/patches/.build.yml] build success builds.sr.ht
2024-04-16  3:33 ` [PATCH olang v1] spec: ebnf: add binary expressions Carlos Maniero
2024-04-16 19:20   ` Johnny Richard [this message]
2024-04-16 23:17     ` ricardo_kagawa
2024-04-18 23:17       ` Johnny Richard
2024-04-16 23:41 ` Johnny Richard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52aqozoevpqhucq67znjjbaqrpb65tubgc3yrp7isqo2x2bofz@ugtgrccjdkbb \
    --to=johnny@johnnyrichard.com \
    --cc=carlos@maniero.me \
    --cc=ricardo_kagawa@disroot.org \
    --cc=~johnnyrichard/olang-devel@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.johnnyrichard.com/olang.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox