Nadim, from what you have written I sense that you appreciate (or will
enjoy learning about) the style of programming that emerged with SNOBOL
some time ago. The notion of programming not just by saying "do this, then
this, then..." but at a higher and more conceptual level of *matching*
*situation
Hello, and thank you for your response.
I never intended to suggest that adding pattern matching would allow Go
computational capabilities that it did not previously have. I agree that
switch can be wielded to achieve the same logic in a syntax and structures
that roughly resembles my suggestion.
On Tue, Jun 4, 2019 at 10:22 PM Nadim Kobeissi wrote:
>
> Two more examples to show off some more cool ways match could be useful.
> Here, I just demonstrate how we can have logic inside matches thanks to
> anonymous functions:
>
> result = match getDayAndDate() {
> "tuesday", _: "wow looks
Two more examples to show off some more cool ways match could be useful.
Here, I just demonstrate how we can have logic inside matches thanks to
anonymous functions:
result = match getDayAndDate() {
"tuesday", _: "wow looks like it's tuesday",
_, 5: (func() string {
if isItWednesd