logs archiveBotHelp.net / Freenode / #ada / 2015 / August / 15 / 1
Visaoni
sparre: you mean just use a package as an object?
sparre
Visaoni: Basically. Mostly because it avoids depending on buggy Ada 2012 implementations and explicitly having to mention the state in every call to Random.
One could of course just write that as a wrapper around a Generator type.
nerilex
hi, can I overload the equality-test operator for a non limited type?
my aim is to have an array comparison which has constant time (to avoid side-channel attacks)
Lucretia
jk4_: ada.cx down again
nerdboy
moin...
antranigv
in Ada, when we say a subprogram, do we mean a procedure or a function? or both?
Lucretia
both
antranigv
I see, and I just saw "Like Pascal and unlike C, a subprogram can contain nested subprograms within them" any example why to use that?
or is it only to be, say, more safe
Lucretia
to split up large ones, but it still can be difficult to read, tbh
also, it stops other subprograms frm using them
pcc
if subprogram A only exists to serve subprogram B, it makes sense for A to be local to B
antranigv
I see, nice
Visaoni
antranigv: some people will tell you to pretend otherwise, but nested subprograms are also scoped like any other blocks, so you can do things like access variables in the containing subprogram without passing them as parameters
sparre
nerilex: Yes, you can.
Lucretia: It's ada.wtf
oliver117
gnatmake exits with 0 when it can't generate dependency information, stupid
Lucretia
sparre: oh yeah, Allegra-- needs updating then :D
Shark8
Hi all.
oliver117
Hi
Damaki
It's a shame neither Type_Invariant nor Dynamic_Predicate are available in SPARK
Shark8
Damaki:
Damaki: They aren't?
Damaki
Nope
I tried using them and GNATprove said that they aren't supported.
Shark8
I would have expected at least Type_Invarient to be there.
Ah... well, maybe they'll be supported in the next edition?
It seems to me that SPARK is getting a lot of attention WRT develpment.
Damaki
"warning: dynamic type predicate ignored (not yet supported)" is the precise message
Yeah, I hope that they will be in the next edition.
SPARK GPL 2015 introduced ghost code, which is great.
It's just a shame that I have to wait another year :)
There are ways of working around it though. Mainly by adding preconditions/postconditions onto the subprograms which use the type, but it's really ugly.
And adds a burden onto other code which use the subprograms.
« prev next »