From: mockturtle <framefritti@gmail.com>
Subject: Re: Question about asynchronous calls
Date: Wed, 6 Nov 2013 12:49:26 -0800 (PST)
Date: 2013-11-06T12:49:26-08:00 [thread overview]
Message-ID: <60be5eb1-85e0-43c5-8c81-d191ee805dd3@googlegroups.com> (raw)
In-Reply-To: <8a7f97ef-672e-4930-9502-e1202dd158fd@googlegroups.com>
On Wednesday, November 6, 2013 8:54:02 PM UTC+1, Shark8 wrote:
>
>
> While it doesn't seem like a big thing: subtypes.
>
> It's nice not to have to check results of some-function from obviously-incorrect-but-technically-possible values like we have to in C/C++/PHP:
>
> Ex: Some_Array'Length returns Natural, I don't have to check for -1 whenever I use it.
Thank you for the suggestion. Actually, I already have something like that in program, with an example taken from some code of mine: a type representing a valid Matlab variable name (I hope the wrap-around does not mess with the code)
type Matlab_Name is new
String
with Dynamic_Predicate =>
(for all I in Matlab_Name'Range =>
Is_Alphanumeric (Matlab_Name (I)) or Matlab_Name (I) = '_')
and
Is_Letter (Matlab_Name (Matlab_Name'First));
I am just beginning to use this, contracts and invariants and it turns out that they are amazing "bug traps."
next prev parent reply other threads:[~2013-11-06 20:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-06 11:05 Question about asynchronous calls mockturtle
2013-11-06 18:49 ` J-P. Rosen
2013-11-06 20:40 ` mockturtle
2013-11-06 19:54 ` Shark8
2013-11-06 20:49 ` mockturtle [this message]
2013-11-07 7:46 ` Stefan.Lucks
2013-11-07 10:23 ` Predicates (was: Question about asynchronous calls) Georg Bauhaus
2013-11-07 18:59 ` Question about asynchronous calls mockturtle
2013-11-07 8:18 ` Jacob Sparre Andersen
2013-11-07 19:00 ` mockturtle
2013-11-06 20:49 ` Jeffrey Carter
2013-11-06 20:58 ` Shark8
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox