42, a language for paranoid programmers
42 is an object oriented language where metaprogramming and an expressive type system cooperate into creating a secure programming environment, where modular security properties can be enforced even in the presence of adversarial code running in our security critical processes.
Person = Data:{
var S name, var S.List allergies
@Cache.Now class method
Void invariant(S name, S.List allergies) = X[
!name.isEmpty() msg=
S"Persons names can not be empty";
allergies.size()<10I msg=
S"Too many allergies for a person";
]
}
Main = (
bob = Person(name=S"Bob", allergies=\[S"dust";S"pollen"])
Debug(S"Hello to %bob !!")
)
Information updated 10/07/22