The Power of Interoperability: Why Objects Are Inevitable

91 views
Skip to first unread message

Josue Barbosa dos Santos

unread,
Jul 30, 2014, 10:37:23 AM7/30/14
to growing-object-o...@googlegroups.com

Steve Freeeman

unread,
Jul 31, 2014, 5:22:58 AM7/31/14
to growing-object-o...@googlegroups.com
He has some interesting points, but a narrow view. He ought to be referencing what people do with JavaScript, for example.

Meanwhile, Stuart Sierra's latest stuff about how to scale Clojure looks more and more like OO to me.

S

Nat Pryce

unread,
Jul 31, 2014, 6:11:09 AM7/31/14
to growing-object-o...@googlegroups.com
Rust's traits seem to address the author's concerns with Haskell's type classes.  They act as type classes when bound statically but also act as OO-style interface types with polymorphic dispatch.  I find them a big improvement on interfaces as used in Java and COM.

--Nat


--

---
You received this message because you are subscribed to the Google Groups "Growing Object-Oriented Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriente...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
http://www.natpryce.com

Steve Freeeman

unread,
Jul 31, 2014, 6:36:02 AM7/31/14
to growing-object-o...@googlegroups.com
you really need to find a full-time Rust gig...

S

Nat Pryce

unread,
Jul 31, 2014, 6:39:56 AM7/31/14
to growing-object-o...@googlegroups.com
I don't think there are any Rust gigs yet. The language isn't finished and the stdlib is missing huge pieces of functionality needed by a system programming language.

But Rust is good for playing about with hardware control on the Raspberry Pi.  More about that soon...


--

---
You received this message because you are subscribed to the Google Groups "Growing Object-Oriented Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriente...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rick Mugridge

unread,
Jul 31, 2014, 6:29:58 PM7/31/14
to growing-object-o...@googlegroups.com
Nat, What especially attracts you to Rust? I'm wondering whether to take a closer look. Do Rust traits differ from Scala?

Nat Pryce

unread,
Aug 1, 2014, 5:02:10 AM8/1/14
to growing-object-o...@googlegroups.com
Rust appeals to me as a successor to C and C++.  It has a modern type system that disallows memory errors: dereferencing null and dangling pointers, memory leaks. It doesn't have the overhead of a managed language (zero-overhead abstractions). Like C++ it has RAII for resource management. Like functional languages it has algebraic data types and destructuring pattern matching, lambdas and closures.  It has messaging passing concurrency based on CSP (which fits my OO habits well), and the type system enforces the shared-nothing concurrency and so disallows data races.

Rust's traits are more like Haskell's type classes than Scala's traits.  A Rust trait defines a set of operations that can be associated with a data type.  An "impl" declaration defines the functions for a specific data type. The closest equivalent in Scala (I think) is an implicit function parameter used as a typeclass of a generic function.

--Nat

Tim Wood

unread,
Aug 1, 2014, 8:47:26 AM8/1/14
to growing-object-o...@googlegroups.com
What do you think about the Rust syntax? I think a lot of the stuff you have said in the past has been somehow related to syntax - at least in my mind. For example, the kinds of internal DSLs in JMock/Hamcrest/WindowLicker. Do you have any feel for how amenable Rust is to such a style (of creating syntactically clean looking internal DSLs for things)? 

Nat Pryce

unread,
Aug 1, 2014, 8:56:37 AM8/1/14
to growing-object-o...@googlegroups.com
I think the syntax is very clean -- certainly better than C++ but not as elegant as Haskell or ML. Lambdas lets you write your own control abstractions.  And Rust has hygienic macros (like Scheme) that let you write your own syntax.  So, a good story, syntax-wise.  Clean, extensible syntax on top of a low level systems programming language that lets you twiddle bits, define no-cost abstractions and gives you precise control over memory allocation.

--Nat
Reply all
Reply to author
Forward
0 new messages