Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #23824

Re: Programming Style

From Bernd Paysan <bernd.paysan@gmx.de>
Newsgroups comp.lang.forth
Subject Re: Programming Style
Date 2013-06-20 13:02 +0200
Organization 1&1 Internet AG
Message-ID <kpungk$q9u$1@online.de> (permalink)
References (9 earlier) <kpmrkg$duv$1@speranza.aioe.org> <eb6a2a47-d949-4611-b6cd-1dd8430a085d@e13g2000yqp.googlegroups.com> <Ie-dnVgRZrAbJV_MnZ2dnUVZ7o-dnZ2d@supernews.com> <283f9691-1386-4159-8223-e6a305455aab@x6g2000vbj.googlegroups.com> <7M2dnewNZYW3SF_MnZ2dnUVZ_oydnZ2d@supernews.com>

Show all headers | View raw


Andrew Haley wrote:

> Alex McDonald <blog@rivadpm.com> wrote:
> I'm sorry, rereading that I realize that I expressed myself badly.
> 
> I'm not really suggesting distinct mechanisms, just pointing out that
> we need to keep the differences between these cases clear in our
> minds.  There's a regrettable tendency to have "catch-all" handlers
> that are appropriate for, say, environmental conditions but not things
> such as divide-by-zero errors.  Carrying on in such circumstances is
> probably not the right thing to do.
> 
> Having said that, file not found isn't always an exceptional
> condition, and perhaps shouldn't be treated as one.

I'm doing quite well with the approach of catch-all in net2o.  The server 
process (which is handling requests - the process sending requests is named 
"client") is just printing out all exceptions (into a log file), passing on 
the throw code to the client, and continues.  Of course, there shouldn't be 
a division by zero or an illegal address exception, but a "file not found" 
is just like a 404 in HTTP.  For the server, this is not even an error as 
such, this is just another response.

For things like "authentication checksum not correct", the server does not 
send the throw-codes to the client, but silently drops the packet instead.  
The client will re-send that packet anyways.  It's just that the server 
process can't do anything reasonable with such a corrupted packet, and has 
to abort the processing of the current packet.

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://bernd-paysan.de/

Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Programming Style rickman <gnuarm@gmail.com> - 2013-06-09 14:33 -0400
  Re: Programming Style Paul Rubin <no.email@nospam.invalid> - 2013-06-09 11:42 -0700
    Re: Programming Style rickman <gnuarm@gmail.com> - 2013-06-09 15:22 -0400
  Re: Programming Style "WJ" <w_a_x_man@yahoo.com> - 2013-06-09 19:16 +0000
    Re: Programming Style rickman <gnuarm@gmail.com> - 2013-06-09 15:36 -0400
      Re: Programming Style Roberto Waltman <usenet@rwaltman.com> - 2013-06-09 22:17 -0400
    Re: Programming Style rickman <gnuarm@gmail.com> - 2013-06-22 09:53 -0400
  Re: Programming Style humptydumpty <ouatubi@gmail.com> - 2013-06-10 00:31 -0700
    Re: Programming Style rickman <gnuarm@gmail.com> - 2013-06-10 11:08 -0400
      Re: Programming Style humptydumpty <ouatubi@gmail.com> - 2013-06-10 11:09 -0700
        Re: Programming Style rickman <gnuarm@gmail.com> - 2013-06-10 18:56 -0400
          Re: Programming Style "Elizabeth D. Rather" <erather@forth.com> - 2013-06-10 15:31 -1000
            Re: Programming Style rickman <gnuarm@gmail.com> - 2013-06-11 23:10 -0400
  Re: Programming Style albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-06-10 08:32 +0000
    Re: Programming Style rickman <gnuarm@gmail.com> - 2013-06-10 11:12 -0400
      Re: Programming Style albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-06-10 17:22 +0000
      Re: Programming Style Mark Wills <markrobertwills@yahoo.co.uk> - 2013-06-11 01:01 -0700
        Re: Programming Style Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2013-06-11 15:51 +0100
          Re: Programming Style rickman <gnuarm@gmail.com> - 2013-06-12 11:14 -0400
            Re: Programming Style "Elizabeth D. Rather" <erather@forth.com> - 2013-06-14 13:03 -1000
              Re: Programming Style rickman <gnuarm@gmail.com> - 2013-06-14 19:22 -0400
                Re: Programming Style "Elizabeth D. Rather" <erather@forth.com> - 2013-06-14 16:54 -1000
                Re: Programming Style rickman <gnuarm@gmail.com> - 2013-06-15 12:14 -0400
                Re: Programming Style "Elizabeth D. Rather" <erather@forth.com> - 2013-06-15 11:57 -1000
                Re: Programming Style anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-06-17 16:12 +0000
                Re: Programming Style rickman <gnuarm@gmail.com> - 2013-06-17 23:08 -0400
        Re: Programming Style Hannu Vuolasaho <hannu.vuolasaho@nospam.tut.fi.invalid> - 2013-06-11 18:42 +0000
          Re: Programming Style "Ed" <invalid@invalid.com> - 2013-06-12 12:00 +1000
            Re: Programming Style "Elizabeth D. Rather" <erather@forth.com> - 2013-06-11 17:07 -1000
              Re: Programming Style "Ed" <invalid@invalid.com> - 2013-06-13 14:21 +1000
                Re: Programming Style "Elizabeth D. Rather" <erather@forth.com> - 2013-06-12 18:35 -1000
                Re: Programming Style "Ed" <invalid@invalid.com> - 2013-06-13 16:56 +1000
                Re: Programming Style "Elizabeth D. Rather" <erather@forth.com> - 2013-06-12 21:03 -1000
                Re: Programming Style "Ed" <invalid@invalid.com> - 2013-06-14 10:20 +1000
                Re: Programming Style "Elizabeth D. Rather" <erather@forth.com> - 2013-06-13 15:46 -1000
                Re: Programming Style "Ed" <invalid@invalid.com> - 2013-06-15 23:27 +1000
                Re: Programming Style Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-06-15 10:53 -0500
                Re: Programming Style Mark Wills <markrobertwills@yahoo.co.uk> - 2013-06-14 01:34 -0700
                Re: Programming Style anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-06-14 12:12 +0000
                Re: Programming Style albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-06-14 15:13 +0000
                Re: Programming Style "Ed" <invalid@invalid.com> - 2013-06-17 21:25 +1000
                Re: Programming Style anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-06-17 15:37 +0000
                Re: Programming Style Elizabeth D Rather <erather@forth.com> - 2013-06-17 08:17 -1000
                Re: Programming Style albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-06-17 19:47 +0000
                Re: Programming Style anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-06-18 08:12 +0000
                Re: Programming Style Alex McDonald <blog@rivadpm.com> - 2013-06-17 12:59 -0700
                Re: Programming Style rickman <gnuarm@gmail.com> - 2013-06-17 23:33 -0400
                Re: Programming Style Hugh Aguilar <hughaguilar96@yahoo.com> - 2013-06-19 19:50 -0700
                Re: Programming Style Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-06-20 03:08 -0500
                Re: Programming Style Alex McDonald <blog@rivadpm.com> - 2013-06-20 01:55 -0700
                Re: Programming Style Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-06-20 05:10 -0500
                Re: Programming Style Bernd Paysan <bernd.paysan@gmx.de> - 2013-06-20 13:02 +0200
                Re: Programming Style anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-06-20 15:40 +0000
                Re: Programming Style "Elizabeth D. Rather" <erather@forth.com> - 2013-06-20 07:21 -1000
                Re: Programming Style albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-06-20 09:50 +0000
                Re: Programming Style rickman <gnuarm@gmail.com> - 2013-06-14 18:50 -0400
                Re: Programming Style "Ed" <invalid@invalid.com> - 2013-06-16 00:31 +1000
                Re: Programming Style Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-06-15 10:59 -0500
                Re: Programming Style albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-06-13 10:48 +0000
                Re: Programming Style "Elizabeth D. Rather" <erather@forth.com> - 2013-06-13 07:44 -1000
                Re: Programming Style albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-06-15 16:31 +0000
            Re: Programming Style albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-06-12 11:10 +0000
              Re: Programming Style mhx@iae.nl (Marcel Hendrix) - 2013-06-12 20:51 +0200
            Re: Programming Style anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-06-12 15:06 +0000
              Re: Programming Style "Ed" <invalid@invalid.com> - 2013-06-13 14:54 +1000
                Re: Programming Style "Elizabeth D. Rather" <erather@forth.com> - 2013-06-12 20:43 -1000
                Re: Programming Style anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-06-14 12:45 +0000
          Re: Programming Style rickman <gnuarm@gmail.com> - 2013-06-14 16:39 -0400
            Re: Programming Style "Elizabeth D. Rather" <erather@forth.com> - 2013-06-14 11:37 -1000
        Re: Programming Style Hugh Aguilar <hughaguilar96@yahoo.com> - 2013-06-11 18:23 -0700
      Re: Programming Style "Elizabeth D. Rather" <erather@forth.com> - 2013-06-15 08:45 -1000

csiph-web