You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucy.apache.org by "Petr Pisar (JIRA)" <ji...@apache.org> on 2015/09/17 18:02:04 UTC

[lucy-issues] [jira] [Updated] (CLOWNFISH-57) Map clownfish.Obj to Go empty interface

     [ https://issues.apache.org/jira/browse/CLOWNFISH-57?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Petr Pisar updated CLOWNFISH-57:
--------------------------------
    Attachment: 0001-Use-system-lemon-if-possible.patch

Patch against Clownfish-CFC-0.4.2.

> Map clownfish.Obj to Go empty interface
> ---------------------------------------
>
>                 Key: CLOWNFISH-57
>                 URL: https://issues.apache.org/jira/browse/CLOWNFISH-57
>             Project: Apache Lucy-Clownfish
>          Issue Type: Improvement
>          Components: Go
>            Reporter: Marvin Humphrey
>            Assignee: Marvin Humphrey
>             Fix For: 0.5.0
>
>         Attachments: 0001-Use-system-lemon-if-possible.patch
>
>
> Autogenerated bindings for Clownfish subroutines which accept or return
> clownfish Obj should be mapped to Go's "empty interface" type, `interface{}`.
> This sacrifices some type safety, but it is the only way to achieve certain
> desirable effects.  For example, it should be possible for Vector's Push()
> method to take a Go string, instead of requiring the user to perform a manual
> conversion to a Clownfish object.  Similarly, Vector's Pop() should be able to
> return a Go string.
> Functions which need to return an actual clownfish Obj wrapped in a Go struct
> will need to have hand-coded bindings, but there are fewer of those so
> converting Obj by default is the better choice.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)