News for hackers. Stuff that matters.
Re:Measuring Polymorphism in Python Programs [pdf] by leovonl on Wednesday June 15, 2016 @01:45PM (#11910785)
> I wonder whether the authors consider "value = somedict.get('somekey')" or "match_object = re.search(pattern, somestring)" as returning a single type. Both of those common calls can return None.

  val get: 'a dict -> 'a -> 'b option

  val search: re -> string -> match option
Above is an hypotetical type notation in OCaml for both functions. I think it pretty much covers everything.

There are no comments on this comment yet.