by rchaves · 5y ago · 0 comments
> Not everything is an object (Ruby). Nor is everything a function (any FP), a string (Perl), a process (Elixir), an actor (Elixir), a value, a thunk, a message, a list (Clojure), a file (Unix), or an expression (Clojure). Not everything is data (Clojure), nor is everything code. Not everything is lazy (Haskell), immutable (Haskell), pure (Haskell), copyable, serializable, sortable, or transmissible over the network. goto is not the only control operator, and neither is call/cc.
Can you help me fill the missing ones?
Function (lambda calculus, FP)
String (shell, tcl, perl)
Process, actor (the actor model, Carl Hewitt, Erlang)
Value, immutable, pure (pure FP)
Thunk, lazy (lazy FP, Haskell)
File (Unix, plan 9)
List (lisp)
Expression (lisp macros, see linked essay)
Copyable (languages without linear type systems, ie. almost everything but rust; tbf some languages have a move/copy distinction even if they don't enforce it with a type system)
Serializable, transmissible over the network (anything that tries to do transparent RPC or state saving, smalltalk images, object databases, X windows)
Sortable (anything with a generic sort function that doesn't take a comparator or similar; ditto generic collection types like maps or sets that don't take a comparator or hash function)
goto (see Dijkstra's "goto considered harmful" essay)
call/cc (Scheme; see also recent work on algebraic effects and delimited continuations)
(I'm the author)
Interesting enough after more than 45 years pidfds [1] got added.
If you think Ruby goes far with that idea, check out Pharo. In Pharo, even an object's fields are objects. Not just the value the field references. The field itself.
[0] https://en.wikipedia.org/wiki/Common_Lisp_Object_System#Meta...
Serializable and transmissible are implied by “everything is data” and “everything is an expression”.
Copyable is implied by “...immutable” and “...data”.