Haskell is a relatively poor example of a "Everything is an X" language. There are a lot of different kinds of things in the language that aren't all that uniform. Coffeescript out of all things was more in the "everything is an expression" sort of boat.<p>Ruby on the other hand is a good example of an "Everything is an Object" language, as it seems to be pretty consistent about that.
Missed one: On a computer, everything is a binary string. It's zeros and ones all the way down.<p>While I think it simplifies the electrical engineering in that it provides consistency*, I don't think it provides a good interface. The problem is that there are lots of totally arbitrary ways of encoding different objects as binary strings; and lots of nonsense operations you can do on those strings. Maybe the other examples in the list are similar.<p>I think another relevant quote is: "It's better to have fifty functions over one type, instead of fifty types with one function each."<p>* - which is the main concern for EEs anyway
Previous Discussion:<p>Everything Is an X (November 12, 2020)<p><a href="https://news.ycombinator.com/item?id=25078209" rel="nofollow">https://news.ycombinator.com/item?id=25078209</a>
I'm usually a big fan of this pattern, but I think one of the biggest examples how not to do it are browsers and the "everything is hypertext" paradigm.<p>Browser UI still pretends we're in the 90s and every website is mostly text with some hyperlinks intermitted and possibly some fancy formatting using CSS. This is why the only UI primitives a browser presents natively are selecting text, printing and navigating backwards and forwards.<p>Nevermind that many webpages are sprawling applications by now, which frequently reinvent UI elements and display all kinds of complex entities. But for the browser UI, it's still all just text and fancy formatting.
>Emacs: everything is a buffer.<p>This was taken from TECO, the editor on which it was prototyped. TECO had 36 Q-registers A-Z,0-9, which are essentially text buffers
I first head "everything is a(n)" in terms of Ruby: "everything is an object."<p>It's an interesting thing to say in terms of the possibilities you get in that language, even if it is clearly false, think of the assignment operator for example. You can't do something like:<p><pre><code> =.to_str
</code></pre>
because <i>=</i> is not an object, it's syntax.