Forums

Q & A

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

Q & A

Postby Charles » Sat Oct 10, 2009 1:54 pm

I received some questions in email, but I prefer to answer them here for everyone:

-- How to initialize a member variable and make it private?

First, you can rely on the fact that double underscored methods are automatically private. If that does not suit you, put "is private" on the next line. Note that the keyword "is" also works as an operator in expressions, so it's too ambiguous to put on the same line.
class X

var __a = 5

var _b = 3
is private

Someday we'll have the following, like we do for shared:
class X

private

var _a = 5
var _b = 3


-- Where is the 'KeywordSpecs' class?

workspace/Source/KeywordSpecs.cobra which you can browse online


--What is the license of the intermediate C# code? Who is considered the author?

You own the generated code (and your original source code) so your project can be any license you want including commercial, public domain, any open source, etc.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Q & A

Postby hopscc » Tue Oct 13, 2009 5:24 pm

re:
Note that the keyword "is" also works as an operator in expressions, so it's too ambiguous to put on the same line.


Theres a new (latest) patch on ticket:34 that corrects that ambiguity without any change in the keyword syntax
allowing the (obvious) use of an 'is clause' on the same line - see monologue alongside the patch on the ticket.
hopscc
 
Posts: 632
Location: New Plymouth, Taranaki, New Zealand


Return to Discussion

Who is online

Users browsing this forum: No registered users and 78 guests

cron