[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: An idea for error handling that could work with Myrddin
- Subject: Re: An idea for error handling that could work with Myrddin
- From: Ryan Gonzalez <rymg19@xxxxxxxxx>
- Date: Tue, 22 Mar 2016 10:36:03 -0500
- To: Ori Bernstein <ori@xxxxxxxxxxxxxx>
- Cc: myrddin-dev@xxxxxxxxxxxxxx
Ack, I forgot that part. That's what happens when you try to do too much in
one day. :/
I updated the article; here's a direct link to the new section:
http://kirbyfan64.github.io/posts/an-idea-for-concise-checked-error-handling-in-imperative-languages.html#sequencing
On Sun, Mar 20, 2016 at 10:02 PM, Ori Bernstein <ori@xxxxxxxxxxxxxx> wrote:
> It looks interesting. One thought is that it seems you have only a single
> expression. The usual gain for try/error style handling is that you can
> have multiple things happen in one block, and break out early when you see
> the first error. Something like:
>
>
> try
> fd = std.dial("tcp|host!port")
> std.write(fd, "header")
> std.write(fd, "body")
> std.read(fd, responsebuf[:])
> ...
> except thingy
> handle error
> ;;
>
> I might be misunderstanding, but I'm not sure if this is possible with your
> proposed system?
>
> On Sun, 20 Mar 2016 18:34:15 -0500, Ryan Gonzalez <rymg19@xxxxxxxxx>
> wrote:
>
> > I just put a new post on my web site:
> >
> >
> http://kirbyfan64.github.io/posts/an-idea-for-concise-checked-error-handling-in-imperative-languages.html
> >
> > Although I used Crystal in the examples, I had Myrddin in mind. I just
> was
> > too lazy to think of how the semantics would be in a low-level language,
> > and Crystal's syntax is close to Ruby, which is really well-known.
> >
> > But the idea could still apply well, especially since Myrddin has type
> > inference like I mentioned. However, I'm not sure how exactly throwing
> > errors would be, since, without some kind of copy constructor system, I
> > could see it being somewhat hard to debug.
> >
> > Anyway, thoughts?
> >
> > --
> > Ryan
> > [ERROR]: Your autotools build scripts are 200 lines longer than your
> > program. Something’s wrong.
> > http://kirbyfan64.github.io/
>
>
> --
> Ori Bernstein
>
--
Ryan
[ERROR]: Your autotools build scripts are 200 lines longer than your
program. Something’s wrong.
http://kirbyfan64.github.io/