[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Strict 'struct' pattern
- From: Joshua Haberman <joshua@...>
- Date: Tue, 11 Aug 2009 23:19:51 +0000 (UTC)
steve donovan <steve.j.donovan <at> gmail.com> writes:
>
> On Mon, Aug 10, 2009 at 10:16 PM, Joshua Haberman<joshua <at> reverberate.org>
wrote:
> 1 > - instances of Alice have a more efficient representation in memory.
>
> 2 > - since "x" and "y" are strongly typed, we can throw an error
>
> 3 > - you get a very efficient, backward compatible, language-independent
> > serialization format for free (protocol buffers).
>
> This is a good combination of features, especially if you did need to
> interoperate with other languages.
I am really glad you think so.
> (Protocol buffers are a lot
> simpler than all that IDL that gave me a headache last year, and using
> XML has always seemed slightly insane)
Yes. I think XML has the unfortunate combination of being completely
wrong for this problem space but *appearing* to be a reasonable solution.
I agree that protocol buffers are a much better solution, which is one
reason that I'm spending so much effort on this project. And by the
way, if you're not aware protobufs have a text format also!
> And, nice for RPC.
>
> Does it require the Google proto compiler?
Nope! When you are working in a dynamic language like Lua, no
compile step will be necessary -- you'll (eventually) be able
to load .proto files directly. You'll be able to include them
as easily as you can include Lua source.
I do have a proto compiler (which is totally separate from the
Google compiler), but it is only required if you want static type
safety from a static language like C++ or Java.
Josh