Conditional compilation based on crate type
Related
More from osa1.net - All posts
The main use case of resumable exceptions would be collecting a bunch of errors (instead of bailing out after the first one) to log or show to the user, or actually recovering and continuing from the point of error detection, rather than in a call site. Why not design the code to allow error recovery, instead of using a language feature? There...
Code is tree structured, but manipulated as a sequence of characters. Most language tools1 need to convert these sequence of characters to the tree form as the first thing to be able to do anything. When the program is being edited, the tree structure is often broken, and often to the point where the tool cannot operate. For example: An opening...
Subtyping is a relation between two types. It often comes with a typing rule called “subsumption”, which says that if type B is a subtype of type A (usually shown as B ), then a value of type B can be assumed to have type A. The crucial part is that subsumption is implicit, the programmer doesn’t explicitly cast the value with type B to type A....
OOP is certainly not my favorite paradigm, but I think mainstream statically-typed OOP does a few things right that are very important for programming with many people, over long periods of time. In this post I want to explain what I think is the most important one of these things that the mainstream statically-typed OOP languages do well. I will...
Since 2013 I’ve had the chance to use OCaml a few times in different jobs, and I got frustrated and disappointed every time I had to use it. I just don’t enjoy writing OCaml. In this post I want to summarize some of the reasons why I don’t like OCaml and why I wouldn’t choose it for a new project today. No standard and easy way of implementing...