News for hackers. Stuff that matters.
Re:One Way to Represent Things by ridiculous_fish on Thursday February 25, 2021 @11:38PM (#26271407)
"Everything is an object" is a very deep idea. Make a system where everything is an object and every object knows what it can do: it becomes dynamically self-describing.

The "formal side" assumes a static environment, but our OS and apps and browsers are constantly churning. When the runtime reality diverges from the compile-time model, you'll want dynamicism: can this object do that? What happens if I try to invoke an unsupported operation? etc.

Re:One Way to Represent Things by hibbelig on Friday February 26, 2021 @07:06AM (#26273959)
But which object does what I need? If a is an array and s is a separator, do I write s.join(a) or a.join(s) or String.join(s, a)?
Re:One Way to Represent Things by scroot on Friday February 26, 2021 @09:49AM (#26275281)
In Smalltalk, if you really need to find this, there is the Finder in which you can provide examples of input and output and it will suggest messages that implement the desired functionality.

Also, the message does not need to be called "join," especially since it's use in the culture is ambiguous and confusing.

Re:One Way to Represent Things by hibbelig on Friday February 26, 2021 @10:13AM (#26275522)
That's pretty amazing. Thank you!