public inbox for ~johnnyrichard/olang-devel@lists.sr.ht
 help / color / mirror / code / Atom feed
From: Johnny Richard <johnny@johnnyrichard.com>
To: ricardo_kagawa@disroot.org
Cc: carlos@maniero.me, ~johnnyrichard/olang-devel@lists.sr.ht
Subject: Re: [PATCH] fixup! docs: spec: add variables and constants specification
Date: Tue, 16 Apr 2024 21:01:13 +0200	[thread overview]
Message-ID: <qtke4jwfojeasxynbaxxcx4u72dclou2clwlu676lzdxgni723@r3ia53v5z3og> (raw)
In-Reply-To: <sm7jzr3mklfxscefg25cdhnrtjqldawquvgq6cdczi5kfyt4my@upgwv63nrzw7>

On Sat, Apr 13, 2024 at 12:36:55AM +0200, Johnny Richard wrote:
> > > This patch lacks support to the following valid assignment expression
> > > (which I think adds flexibility to the language):
> > > 
> > >     var x: u32 = a = b = c = 1
> > 
> > Personally, I don't like this idiom, but I wouldn't stop you from adding
> > it. Johnny's patch actually already enables this, and also the
> > following (for clarity, of course the `if` statement does not exist yet,
> > but it is included here as an example of what might come in the future):
> > 
> > ```
> > var x
> > if (x = next()) {
> >   return x
> > }
> > ```
> > 
> > Which is something I don't like either, just as much.
> 
> Carlos and I discussed it and we also agreed on removing this assignment.
> The patch v2 has removed it.

Made a mistake here.  The current spec still have assignment
expressions.  For context, we agreed on keep it because the only place
we would miss this feature would be on *if* and *while* statements.

But we also don't have strong option on keep it. Since it will be little
bit annoying of optimizing the binary.

In conclusion, I believe everyone is Okay on removing it.

PS. Carlos prefers being called Maniero haha :^)


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

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-27  3:21 [PATCH olang v1 0/2] docs: variables specification Carlos Maniero
2024-03-27  3:21 ` [PATCH olang v1 1/2] docs: spec: rename program to translation-unit Carlos Maniero
2024-03-27 21:20   ` Johnny Richard
2024-03-28 13:50     ` Carlos Maniero
2024-03-27  3:21 ` [PATCH olang v1 2/2] docs: spec: add variables and constants specification Carlos Maniero
2024-03-27  3:22   ` [olang/patches/.build.yml] build failed builds.sr.ht
2024-03-27 21:37   ` [PATCH olang v1 2/2] docs: spec: add variables and constants specification Johnny Richard
2024-03-28 14:11     ` Carlos Maniero
2024-04-01 17:48       ` Johnny Richard
2024-03-30  1:14     ` Carlos Maniero
2024-04-01 17:54       ` Johnny Richard
2024-04-11 22:39     ` [PATCH] fixup! " ricardo_kagawa
2024-04-12 22:36       ` Johnny Richard
2024-04-13  2:18         ` Carlos Maniero
2024-04-16 19:01         ` Johnny Richard [this message]

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=qtke4jwfojeasxynbaxxcx4u72dclou2clwlu676lzdxgni723@r3ia53v5z3og \
    --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