This is in theory. In practice, as demonstrated by the article, these assurances are not bulletproof.
443 karma · joined October 13, 2013
This is in theory. In practice, as demonstrated by the article, these assurances are not bulletproof.
For those that don’t hate new ideas, functors and the like allow you to write transformations on data in terms of elements, rather than the structure of the container. This means that it doesn’t have access to things like neighboring elements or the size of the overall structure( unless other traits which provide those capabilities are mentioned in the trait bounds ). Such well-known algebraic restrictions can be useful for managing complexity when writing compilers or other data pipelines.
The simplest use-case is when you want to use an algorithm across multiple representations of a data structure(list vs array, for example).
I’m willing to hear arguments about the merits of how React approaches these issues, but I would want any frontend UI library for generating and updating DOM trees to address them in some way.
s - the larger data structure
a - a view value
b - a “update” value
t - the data structure after an update is applied
Of course, everything is still immutable in the same way that cons-ing a value onto a list is immutable.
The change in type between s and t allows you to nest these views, hide information, etc.
It’s like the use of `T` as a name in most Java or C++ generics.
This was a known and willfully ignored business risk for these places.
It's harder to call someone a "libtard" or a "troglodyte" if you have to sit next to them in a pew for the rest of your life.
It would not surprise me that on the whole our society is worse off for lack of a widespread secular tradition of discussing these concepts with your community.
edit: substitute "secular setting" for "secular state", definitely not arguing for the integration of church and state.
At work we use a home-grown Haskell-like language with “row types” which can be split into disjoint sets of fields in order to represent joins and the like.
It works well in most cases, but it’s very easy to forget a type annotation and trigger unmanageable build-times. Often times, it is not obvious where something needs to be annotated. Sure, we can act as human time-outs, but the productivity loss can be substantial, especially for a newcomer to the language.
Evolution is trial and error. Maybe eventually they would change their breeding behaviors to rely less on ice in the wild. Or maybe a rapidly changing environment will cause enough members of this endangered species to go the “error” route, and trigger a population collapse.
“you have to think hard to avoid UB via rust’s FFI mechanics.”
this is contrary to rust’s aims to make such bugs impossible, rather than just hard.
Hence their proposal for a DSL _in rust_, which makes those bugs impossible.
The authors are providing a solution to a clearly identified problem, with the goal of making rust better.
Despite the poor intro, the ideas in the paper are “let’s shrink the unsafe boundary”, not “let’s stick to writing what we know(C).”
These discussions frequently feel “tense”, wherein criticisms based on specific technical details are tied to an attack on the language as a whole.
In that context, the authors definitely shot themselves in the foot with the opening/title.
They identify FFI as an area where it is easy to make mistakes which lead to undefined behavior, argue that it is the result of competing assumptions between C and rust, and then propose a formal system implemented in both in C and in Rust to resolve those issues.
Sure, the problems they identify wouldn’t exist if everything was rewritten in Rust, but on a large enough / old enough codebase, that may impossible to do all at once. This paper attempts to find a way to make rust better within those organizational constraints.
The audience here is not engineering managers deciding in your next tech stack, but programming language researchers.
I live in Denver, with a very large Native population, and many still remember being taken from their families and being forced to speak English, while the rest of the country experience the affluence boom of the suburbs and such. Acknowledging that recent history isn’t controversial in those communities.
Is that better?
https://repository.upenn.edu/cgi/viewcontent.cgi?article=177...
Would be cool to see it for more efficient implementation of functional languages.