You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@etch.apache.org by Bo Hansen <md...@gmail.com> on 2011/07/12 15:15:27 UTC

Example using @extern

Hi,



I’m looking into the Etch protocol – does anybody have an example of using
the @extern declaration to add a custom type? Is this supported in all
stable languages?



Thanks in advance,

Bo

Re: Example using @extern

Posted by Scott Comer <we...@mac.com>.
there's code in the source tree to show how extern works: part of the standard unit tests.

On Jul 12, 2011, at 8:15 AM, Bo Hansen wrote:

> Hi,
> 
>  
> I’m looking into the Etch protocol – does anybody have an example of using the @extern declaration to add a custom type? Is this supported in all stable languages?
> 
>  
> Thanks in advance,
> 
> Bo
> 


Re: Example using @extern

Posted by scott comer <we...@mac.com>.
there is no particular performance penalty (in the java and c# impls) 
for using @Extern. it merely gives you access to the same mechanisms as 
are automatically generated for the native complex types (Map and List).

the ugly part if your native class is Foo, and you write an extern for 
Foo, a subclass of Foo cannot be passed, only the exact class.

scott out

On 7/19/2011 1:19 AM, Bo Hansen wrote:
> Ok, do you have any idea about the overhead of @extern compared to 
> native data types in the current java/csharp implementation? I guess 
> implemented for performance the penalty could be zero given that the 
> code is generated?
>
> Best regards,
> Bo
>
> On Mon, Jul 18, 2011 at 3:56 PM, Martin Veith 
> <Martin.Veith@bmw-carit.de <ma...@bmw-carit.de>> wrote:
>
>     Hi Bo,
>
>     I think it can be implemented for the c-binding as well.
>
>     At the moment we are planning to develop a binding for C++ where
>     the @extern mechanism should also be implemented.
>
>     Best regards
>
>     Martin
>
>     *From:*Bo Hansen [mailto:mdboha@gmail.com <ma...@gmail.com>]
>     *Sent:* Mittwoch, 13. Juli 2011 10:47
>
>
>     *To:* etch-user@incubator.apache.org
>     <ma...@incubator.apache.org>
>     *Subject:* Re: Example using @extern
>
>     Thanks, amazing how I could miss that ;-).
>     Is it missing from c-binding for technical reasons or just no need
>     to implement it yet?
>
>     Best regards,
>     Bo
>
>     On Tue, Jul 12, 2011 at 4:36 PM, Martin Veith
>     <Martin.Veith@bmw-carit.de <ma...@bmw-carit.de>> wrote:
>
>     Hi Bo,
>
>     have you had already a look to the Etch language reference?
>
>     There is described the external type
>     (https://cwiki.apache.org/ETCH/language-reference.html#LanguageReference-ExternalType
>     <https://cwiki.apache.org/ETCH/language-reference.html%23LanguageReference-ExternalType>)
>     as well as an example which shows the use of an @Extern type in
>     the NSDL
>     (https://cwiki.apache.org/ETCH/language-reference.html#LanguageReference-@Extern).
>
>     The @extern declaration is only supported in the Java and Csharp
>     binding.
>
>     Cheers,
>
>     Martin
>
>     *From:*Bo Hansen [mailto:mdboha@gmail.com <ma...@gmail.com>]
>     *Sent:* Dienstag, 12. Juli 2011 15:15
>     *To:* etch-user@incubator.apache.org
>     <ma...@incubator.apache.org>
>     *Subject:* Example using @extern
>
>     Hi,
>
>     I’m looking into the Etch protocol – does anybody have an example
>     of using the @extern declaration to add a custom type? Is this
>     supported in all stable languages?
>
>     Thanks in advance,
>
>     Bo
>
>


Re: Example using @extern

Posted by Bo Hansen <md...@gmail.com>.
Ok, do you have any idea about the overhead of @extern compared to native
data types in the current java/csharp implementation? I guess implemented
for performance the penalty could be zero given that the code is generated?

Best regards,
Bo

On Mon, Jul 18, 2011 at 3:56 PM, Martin Veith <Ma...@bmw-carit.de>wrote:

> Hi Bo, ****
>
> ** **
>
> I think it can be implemented for the c-binding as well. ****
>
> At the moment we are planning to develop a binding for C++ where the
> @extern mechanism should also be implemented.****
>
> ** **
>
> Best regards****
>
> Martin****
>
> ** **
>
> *From:* Bo Hansen [mailto:mdboha@gmail.com]
> *Sent:* Mittwoch, 13. Juli 2011 10:47
>
> *To:* etch-user@incubator.apache.org
> *Subject:* Re: Example using @extern****
>
> ** **
>
> Thanks, amazing how I could miss that ;-).
> Is it missing from c-binding for technical reasons or just no need to
> implement it yet?
>
> Best regards,
> Bo****
>
> On Tue, Jul 12, 2011 at 4:36 PM, Martin Veith <Ma...@bmw-carit.de>
> wrote:****
>
> Hi Bo,****
>
>  ****
>
> have you had already a look to the Etch language reference? ****
>
> There is described the external type (
> https://cwiki.apache.org/ETCH/language-reference.html#LanguageReference-ExternalType)
> as well as an example which shows the use of an @Extern type in the NSDL (
> https://cwiki.apache.org/ETCH/language-reference.html#LanguageReference-@Extern
> ).****
>
>  ****
>
> The @extern declaration is only supported in the Java and Csharp binding.
> ****
>
>  ****
>
> Cheers,****
>
> Martin****
>
>  ****
>
> *From:* Bo Hansen [mailto:mdboha@gmail.com]
> *Sent:* Dienstag, 12. Juli 2011 15:15
> *To:* etch-user@incubator.apache.org
> *Subject:* Example using @extern****
>
>  ****
>
> Hi,****
>
>  ****
>
> I’m looking into the Etch protocol – does anybody have an example of using
> the @extern declaration to add a custom type? Is this supported in all
> stable languages?****
>
>  ****
>
> Thanks in advance,****
>
> Bo****
>
> ** **
>

RE: Example using @extern

Posted by Martin Veith <Ma...@bmw-carit.de>.
Hi Bo,

I think it can be implemented for the c-binding as well.
At the moment we are planning to develop a binding for C++ where the @extern mechanism should also be implemented.

Best regards
Martin

From: Bo Hansen [mailto:mdboha@gmail.com]
Sent: Mittwoch, 13. Juli 2011 10:47
To: etch-user@incubator.apache.org
Subject: Re: Example using @extern

Thanks, amazing how I could miss that ;-).
Is it missing from c-binding for technical reasons or just no need to implement it yet?

Best regards,
Bo
On Tue, Jul 12, 2011 at 4:36 PM, Martin Veith <Ma...@bmw-carit.de>> wrote:
Hi Bo,

have you had already a look to the Etch language reference?
There is described the external type (https://cwiki.apache.org/ETCH/language-reference.html#LanguageReference-ExternalType<https://cwiki.apache.org/ETCH/language-reference.html%23LanguageReference-ExternalType>) as well as an example which shows the use of an @Extern type in the NSDL (https://cwiki.apache.org/ETCH/language-reference.html#LanguageReference-@Extern).

The @extern declaration is only supported in the Java and Csharp binding.

Cheers,
Martin

From: Bo Hansen [mailto:mdboha@gmail.com<ma...@gmail.com>]
Sent: Dienstag, 12. Juli 2011 15:15
To: etch-user@incubator.apache.org<ma...@incubator.apache.org>
Subject: Example using @extern

Hi,

I'm looking into the Etch protocol - does anybody have an example of using the @extern declaration to add a custom type? Is this supported in all stable languages?

Thanks in advance,
Bo


Re: Example using @extern

Posted by Bo Hansen <md...@gmail.com>.
Thanks, amazing how I could miss that ;-).
Is it missing from c-binding for technical reasons or just no need to
implement it yet?

Best regards,
Bo

On Tue, Jul 12, 2011 at 4:36 PM, Martin Veith <Ma...@bmw-carit.de>wrote:

> Hi Bo,****
>
> ** **
>
> have you had already a look to the Etch language reference? ****
>
> There is described the external type (
> https://cwiki.apache.org/ETCH/language-reference.html#LanguageReference-ExternalType)
> as well as an example which shows the use of an @Extern type in the NSDL (
> https://cwiki.apache.org/ETCH/language-reference.html#LanguageReference-@Extern
> ).****
>
> ** **
>
> The @extern declaration is only supported in the Java and Csharp binding.
> ****
>
> ** **
>
> Cheers,****
>
> Martin****
>
> ** **
>
> *From:* Bo Hansen [mailto:mdboha@gmail.com]
> *Sent:* Dienstag, 12. Juli 2011 15:15
> *To:* etch-user@incubator.apache.org
> *Subject:* Example using @extern****
>
> ** **
>
> Hi,****
>
>  ****
>
> I’m looking into the Etch protocol – does anybody have an example of using
> the @extern declaration to add a custom type? Is this supported in all
> stable languages?****
>
>  ****
>
> Thanks in advance,****
>
> Bo****
>

RE: Example using @extern

Posted by Martin Veith <Ma...@bmw-carit.de>.
Hi Bo,

have you had already a look to the Etch language reference?
There is described the external type (https://cwiki.apache.org/ETCH/language-reference.html#LanguageReference-ExternalType<https://cwiki.apache.org/ETCH/language-reference.html%23LanguageReference-ExternalType>) as well as an example which shows the use of an @Extern type in the NSDL (https://cwiki.apache.org/ETCH/language-reference.html#LanguageReference-@Extern).

The @extern declaration is only supported in the Java and Csharp binding.

Cheers,
Martin

From: Bo Hansen [mailto:mdboha@gmail.com]
Sent: Dienstag, 12. Juli 2011 15:15
To: etch-user@incubator.apache.org
Subject: Example using @extern

Hi,

I'm looking into the Etch protocol - does anybody have an example of using the @extern declaration to add a custom type? Is this supported in all stable languages?

Thanks in advance,
Bo