Forums

Confusing use of parentheses

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

Confusing use of parentheses

Postby Chasm » Fri Jun 21, 2013 1:35 am

Hi to all, I'm a new user of Cobra. Like many of you I was unhappy with some aspects of other languages and now I believe I have found THE language that will ultimately surpass all others.

As much as I love it, though, there is one thing that really got me confused for a while. Since you don't have to use parentheses if you're calling a parameterless method, I obviously assumed that you don't have to do so when using a parameterless constructor.

So when I wrote the code bellow, it didn't work, because I actually assigned myTypeInstance the Type of MyType.

myTypeInstance = MyType
myTypeInstance.doSomething

I really see no way around this, so maybe a warning for newbies that may commit the same error?

Thanks a lot for the amazing language!
Chasm
 
Posts: 33

Re: Confusing use of parentheses

Postby Charles » Fri Jun 21, 2013 9:23 am

Thanks for the feedback. We'll look into detecting this situation and issuing a better error message.
Charles
 
Posts: 2510
Location: Los Angeles, CA

Confusing use of parentheses

Postby FareHirehaf » Sun Jul 07, 2013 8:13 pm

Hi there,
I have read that I can use the GPIO-out with my IP cam to - for example - switch on a lamp or something like this.

HOW can I do this? Where can I find descriptions?

I have an Allnet All2282 IP cam.

thanks, max
FareHirehaf
 
Posts: 1
Location: Belgium


Return to Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron