Hops, did you know about the "extern" feature in Cobra?
Also, is the email address I have for you any good? You don't reply.
Forums
Java Back End
Re: Java Back End
Yeah - thats the thing that was renamed from 'fake' for providing/describing info of a class implemented elsewhere ( like in c# alongside cobra code) - also p/Invoke tweaking.
What are you thinking of wrt that ?
Sorry about email - The address you have is correct - unfortunately I tend to chk it at rather irregular intervals
What are you thinking of wrt that ?
Sorry about email - The address you have is correct - unfortunately I tend to chk it at rather irregular intervals
- hopscc
- Posts: 632
- Location: New Plymouth, Taranaki, New Zealand
Re: Java Back End
hopscc wrote:Yeah - thats the thing that was renamed from 'fake' for providing/describing info of a class implemented elsewhere ( like in c# alongside cobra code) - also p/Invoke tweaking.
What are you thinking of wrt that ?
I forget if I mentioned this before, but "extern" was made exactly for specifying external signatures. I needed this for the first Cobra compiler which was written in Python (not IronPython). You can use it for the JVM work or any other back-end.
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Re: Java Back End
Theres a new patch on the ticket.
Passes all tests and compiles itself.
Passes all tests and compiles itself.
- hopscc
- Posts: 632
- Location: New Plymouth, Taranaki, New Zealand
Re: Java Back End
Applied. Thanks.
-- I think when people run on -platform:jvm they are going to want the regular jvm casing for packages like "java.util".
-- We haven't discussed this before, but it seems that Cobra should see Java's getFoo and setFoo methods as properties. These were actually called properties in the context of "Java Beans" several years ago; see:
http://download.oracle.com/javase/tutorial/javabeans/properties/index.html
http://download.oracle.com/javase/tutorial/javabeans/properties/properties.html
I haven't really checked if your JVM back-end is doing that or if you commented on it.
-- I think when people run on -platform:jvm they are going to want the regular jvm casing for packages like "java.util".
-- We haven't discussed this before, but it seems that Cobra should see Java's getFoo and setFoo methods as properties. These were actually called properties in the context of "Java Beans" several years ago; see:
http://download.oracle.com/javase/tutorial/javabeans/properties/index.html
http://download.oracle.com/javase/tutorial/javabeans/properties/properties.html
I haven't really checked if your JVM back-end is doing that or if you commented on it.
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Re: Java Back End
re Regular jvm package casing
Maybe so but they're not going to get it without a rework of some of the non platform dependent pieces of the compiler.
I started off doing package naming exactly for the reason cited and found it wasnt gonna work with some of the existing coding assumptions
- see Expr.cobra IdentifierExpr._bindInt with use of canBeUndottedMember to
determine whether or not to do a local symbol lookup or defer to a (later) namespace search .... or something.
(actually found this was broken when tracking the java/xjava question you asked previously).
I'm goanna go with the existing high level flow/assumptions unless its really impossible, at least until theres something more complete working
Java Properties
Yes java properties/bean properties use get/set ( and 'is') prefixes on methods - thats in JvmJarSig.cobra - JavaClassType.chkForProp
Java (libraries) doesnt use properties anything like .Net - either as commonly or even consistently named as per the above - so at best its an imperfect mapping.
I also started off doing a similar mapping for indexers but there are too many false hits for the indexer pattern (get/set method with one index arg /index arg and value) so thats been suppressed for the moment.
Maybe so but they're not going to get it without a rework of some of the non platform dependent pieces of the compiler.
I started off doing package naming exactly for the reason cited and found it wasnt gonna work with some of the existing coding assumptions
- see Expr.cobra IdentifierExpr._bindInt with use of canBeUndottedMember to
determine whether or not to do a local symbol lookup or defer to a (later) namespace search .... or something.
(actually found this was broken when tracking the java/xjava question you asked previously).
I'm goanna go with the existing high level flow/assumptions unless its really impossible, at least until theres something more complete working
Java Properties
Yes java properties/bean properties use get/set ( and 'is') prefixes on methods - thats in JvmJarSig.cobra - JavaClassType.chkForProp
Java (libraries) doesnt use properties anything like .Net - either as commonly or even consistently named as per the above - so at best its an imperfect mapping.
I also started off doing a similar mapping for indexers but there are too many false hits for the indexer pattern (get/set method with one index arg /index arg and value) so thats been suppressed for the moment.
- hopscc
- Posts: 632
- Location: New Plymouth, Taranaki, New Zealand
Re: Java Back End
patch3 on ticket
- set properties and some minor tweaks ('is' prefixed props NYI).
- set properties and some minor tweaks ('is' prefixed props NYI).
- hopscc
- Posts: 632
- Location: New Plymouth, Taranaki, New Zealand
Re: Java Back End
Thanks. Applied.
What does "NYI" mean?
What does "NYI" mean?
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Re: Java Back End
Not Yet Implemented, I suspect.
99 programming bugs in the code, 99 bugs in the code, fix 1 bug and compile it again, 101 programming bugs in the code
- ObtuseAngle
- Posts: 42
- Location: Gippsland, Australia
Re: Java Back End
Ah thanks.
Hops, what do you mean by "'is' prefixed props"? I presume that props will be implied by methods named "getFoo" and "setFoo" allowing "print obj.foo" and "obj.foo = bar". What does any of that have to do with "is"? Maybe you already covered this in this thread or in your docs, but if so, I'm not recalling correctly.
Hops, what do you mean by "'is' prefixed props"? I presume that props will be implied by methods named "getFoo" and "setFoo" allowing "print obj.foo" and "obj.foo = bar". What does any of that have to do with "is"? Maybe you already covered this in this thread or in your docs, but if so, I'm not recalling correctly.
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Who is online
Users browsing this forum: No registered users and 7 guests