4 ms·
Trying to decode this with examples: > Not everything is an object (Ruby). Nor is everything a function (any FP), a string (Perl), a process (Elixir), an actor
by rchaves 6y ago
Trying to decode this with examples:
> 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?
- usr1106 6y agoUnix being "Everything is a file", has been less and less true starting already in the 1980s. Check the 300+ system calls in Linux and there is lot that is not a file. Many of the system calls would not even need to exist if everything were a file. I some cases that might make things easier, but I don't claim that should be drven to extremes. Interesting enough after more than 45 years pidfds [1] got added. [1] https://lwn.net/Articles/794707/ https://lwn.net/Articles/794707/
- dgb23 6y ago“Everything is code” is implied by “everything is an expression”. Serializable and transmissible are implied by “everything is data” and “everything is an expression”. Copyable is implied by “...immutable” and “...data”.
- rntz 6y agoObjects, messages (OO, Smalltalk, Alan Kay) 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)
- mumblemumble 6y ago> Not everything is an object (Ruby) 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.
- KineticLensman 6y agoSimilarly, in the Metaobject protocol of the Common Lisp Object System (CLOS) [0], classes, slot-descriptions, generic-functions and methods themselves are instances of metaclasses [0] https://en.wikipedia.org/wiki/Common_Lisp_Object_System#Metaobject_Protocol https://en.wikipedia.org/wiki/Common_Lisp_Object_System#Meta...