Before you get an avalanche of emails about "that is an old question,
discussed in design documentation, mailing lists, and extension discussions
over a decade", let me ask you to consider a concept that your comment
implies.

For that to work, it means that a function call either succeeds or fails.
If it succeeds, then that's that. If it fails, then something special
happens. Your "#" means "do this only if the function call failed." In that
case itmust be true that functions have a notion of success and failure,
that the cause of failure is invisibly returned and available as an extra
"and here's why it failed" return value, and, new language concepts are
required to access the value of the invisible return inside that "#{ ... }"
block.

There is good precedent for the S (success) and F (failure) outcomes of
function calls--SNOBOL has that.

For everything else though, it has generally considered more awkward than
the present situation. If you want to contribute along these lines, think
about how to make the access to the invisible error return value feel
natural. (maybe think about it before reading the hundreds of pages of
discussion that await you.

Michael

On Thu, Jun 4, 2020 at 8:43 AM <lgod...@gmail.com> wrote:

> ?? Why not a cleaner syntax e.g.  x = some_func ()  #{ }   .. symbol #
> arbitrarily chosen
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/ea305494-c6ec-46f9-962d-9add01edc8bd%40googlegroups.com
> <https://groups.google.com/d/msgid/golang-nuts/ea305494-c6ec-46f9-962d-9add01edc8bd%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 

*Michael T. jonesmichael.jo...@gmail.com <michael.jo...@gmail.com>*

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CALoEmQygvQtsfKCmaYgDnwbv5tSqcp7Zuqdh0wHtJ0WqkeMYbg%40mail.gmail.com.

Reply via email to