Just pointer fields. Data section fields are always "non-optional".

On Tue, Sep 20, 2016, 6:48 PM Dan Appel <dan.appe...@gmail.com> wrote:

> Does this mean that every field (including lists) is nullable? That's
> quite a shame. Looks like all my generated fields are going to be
> implicitly-unwrapped-optional, then (reminds me of objective-c translated
> into swift).
>
> On Tue, Sep 20, 2016 at 6:14 PM Dan Appel <dan.appe...@gmail.com> wrote:
>
> Oh, well now I feel silly :) Thanks for pointing that out!
> On Tue, Sep 20, 2016 at 5:53 PM David Renshaw <da...@sandstorm.io> wrote:
>
> Those are null pointers. A `has()` accessor would return `false` for them,
> and a `get()` accessor would return the default value. See
> https://capnproto.org/faq.html#how-do-i-make-a-field-optional
>
>
> On Tue, Sep 20, 2016 at 8:44 PM, Dan Appel <dan.appe...@gmail.com> wrote:
>
> Okay, I have a question. In my structs I'm running into pointers that have
> the value of 0 (the UInt64 pointer itself). What do I do with these? Is it
> an error on my end that I'm running into these in the first place? I've
> been trying to debug this for a few hours now and I can't find the source
> of the issue.
>
> Here's some logs that I got from reading CodeGeneratorRequest.ptrs[0]
> (nodes @0 :List(Node)) - link
> <https://gist.github.com/Danappelxx/a4536c946e56919ad6765a550a19c1e5>.
>
> I'm leaning on this being my fault somewhere in the parsing but just
> wanted to make sure I'm not missing something before I dive deeper.
>
>
> On Monday, September 19, 2016 at 6:03:28 PM UTC-7, Dan Appel wrote:
>
> Hi! I've been working on a Swift compiler plugin for the past week or so,
> and have been making decent progress. I've run into a few blind spots in
> the encoding spec (i.e. unions) but seemed to have gotten over the major
> humps.
>
> Just wanted to let people know in case somebody has tips or concerns.
>
> I'll also use this thread as a place to ask any future questions that I
> may have :)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Cap'n Proto" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to capnproto+unsubscr...@googlegroups.com.
> Visit this group at https://groups.google.com/group/capnproto.
>
>
> --
> Dan Appel
>
> --
> Dan Appel
>
> --
> You received this message because you are subscribed to the Google Groups
> "Cap'n Proto" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to capnproto+unsubscr...@googlegroups.com.
> Visit this group at https://groups.google.com/group/capnproto.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to capnproto+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/capnproto.

Reply via email to