Forums

Hello: In Search of the Perfect Language

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

Hello: In Search of the Perfect Language

Postby todd.a » Mon Jun 15, 2009 9:32 am

I recently came across Cobra and I think I'm sold. I haven't gone deep into it yet to see any gotchas but 1. I don't see why a language can't have it all 2. Although I initially disliked Python I've grown to realize that we all indent code so why not use tabs/spaces for blocks 3. I'm a big fan of syntax and sugar. Coming from C#, PHP, Java, Scala, and Python it seems like languages always include something distasteful. High hopes for Cobra.
todd.a
Site Admin
 
Posts: 81
Location: Chicago, IL

Re: Hello: In Search of the Perfect Language

Postby Charles » Mon Jun 15, 2009 10:49 am

I hope you won''t expect total perfection because you'll always find a couple things you would have done differently if you had designed+implemented a language yourself. The key is to take the language as a whole and ask if that's where you want to be (especially in contrast to other available languages).

So, thanks and welcome to the group. Feel free to ask questions here.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Hello: In Search of the Perfect Language

Postby todd.a » Mon Jun 15, 2009 11:49 am

:) I don't expect total perfection, after all nothing in life can be perfect. However I like the approach you have taken by taking all the great features from other languages and incorporating them into one. Scala did a good job at this but Cobra beats it for clean syntax. It would be way too much work for me to design and implement a language myself so I have to find the closest match.
todd.a
Site Admin
 
Posts: 81
Location: Chicago, IL

Re: Hello: In Search of the Perfect Language

Postby todd.a » Mon Jun 15, 2009 7:51 pm

I've been playing with both Cobra and Boo all day and it seems like apart from the REPL Cobra has more to offer than Boo. A few questions came up in the process:
1. Is there a specific reason for translating Cobra to C# before compiling? Not sure if compiling directly to IL would provide any advantages but it sure is more enticing :)
2. Are functions as a first class objects already in the language?

Apart from that it seems like a great langauge. I came across some of the trouble points that users were experiencing in previous forum posts but those are natural. [Chuck] I saw your previous post for the documentation tool, I've been going through the sources to learn more about the language and I will try and help out with some of those TODOs. Can't give a firm deadline on that since I'm still learning the language. I run a startup so if I like it then you can be it's gonna go into some production code (risky, but no risk no fun).
todd.a
Site Admin
 
Posts: 81
Location: Chicago, IL

Re: Hello: In Search of the Perfect Language

Postby Charles » Tue Jun 16, 2009 2:22 am

Thanks.

-- Re: compiling to C#, I cover this in one of the slides. You can move it to a wiki page if you like. There is the disadvantage of slower compilation and now that Cobra is more mature, I'm not opposed to a direct IL back-end. (But it's not high my list.)

-- Also, bringing in the Mono C# compiler as a DLL might be more enticing. It's MIT license and well maintained by Novell. With some effort you could probably pass it tokens instead of source code and the overall result would be faster compilation and less work than an IL back-end.

-- Yes you can pass references to methods around. And we have closures and lambdas. See at least How To Pass References To Methods and poke around the forums and wiki.

-- I wouldn't mind hearing your list of trouble points, especially when they are fresh in your mind. Could help others. Could help us formulate better docs.

-- We don't do firm deadlines around here. We're all part time, volunteers on an open source project. My paying clients get firm deadlines. Cobra gets continuous improvement.

-- Any and all help is appreciated. cobra -doc will be a great place to get your feet wet on the compiler while also contrib'ing something valuable to the community.
Charles
 
Posts: 2515
Location: Los Angeles, CA


Return to Discussion

Who is online

Users browsing this forum: No registered users and 90 guests

cron