mastodontech.de ist einer von vielen unabhängigen Mastodon-Servern, mit dem du dich im Fediverse beteiligen kannst.
Offen für alle (über 16) und bereitgestellt von Markus'Blog

Serverstatistik:

1,4 Tsd.
aktive Profile

#assertions

0 Beiträge0 Beteiligte0 Beiträge heute

One of the many good uses of assertions is to catch cases that Should Never Happen.
The textbook example is the last branch of a multi-way conditional statement where one of the conditions before the final "else" must always be true.

Another, where there must always be an element to be found:
»    for each x in ...
»    »    if x satisfies ...
»    »    »    return x
»    assert false

#Assertions
#ComputerProgramming
#ProgramVerification

#softwareEngineering #programming #commonLisp #assertions #algebra - tight, efficient #lazyEvaluation vector multiplication with #series .
screwlisp.small-web.org/progra

I use assert in lisp, which automatically generates an interactive in-context failure resolution which I utilize in the article, where the lazy cotruncation series feature was not wanted. Shows off a #lisp useage: classic.

@vnikolov what do you think of this example of assert viz your assertables?
+ @kentpitman