Why Cobra? http://webcache.googleusercontent.com/search?q=cache:A7djdaz...
and
Cobra compared to Python: http://webcache.googleusercontent.com/search?q=cache:GmrbTK9...
It sounds like basically the adoption strategy is to sell people coming from .NET on a Python-like language with binary compatibility, rather than to sell people coming from Python on a statically typed, compiled language with source compatibility. So, not as much for me as a Python person, until the ecosystem evolves. Too bad, because it doesn't seem like there was much of a win from giving up forward compatibility. But maybe a cool thing for .NET people?
EDIT: Apparently Boo hasn't been updated for almost a year.. sad. Oh well, that leaves two choices then.
That means when the interest in the language drops to near zero again... I don't know, maybe the authors or maintainers of a web page should be warned before posting the link on Hacker News? I'm angry, because I find Cobra to be one of very nice languages that I'd like to see used more - and hn'ed site does not do any good on that front :/
I was playing with Cobra about a year ago and it was promising then - now it looks like it's almost ready for prime time. I think I'll try to use it for my next project.
#from the website, because it seems to be down for many right now.
class SmallSample
var _random = Random()
def randomString(length as int, alphabet as String) as String
require
length > 0
alphabet <> ''
ensure
result.length == length
test
utils = SmallSample()
assert utils.randomString(5, 'ab').length == 5
s = utils.randomString(1000, 'a')
for c in s, assert c == 'a'
body
sb = StringBuilder()
for i in length
c = alphabet[_random.next(alphabet.length)]
sb.append(c)
return sb.toStringSeems that doesn't use explicit variable declaration. Supporting that would be a great improvement over Python.
You often won't see this for the sake of succinctness. I might have misunderstood what you were saying but thought I'd mention that.
There have been a few attempts to hack (design by) contracts into Perl. Here are some which can be found on CPAN:
* Class::Agreement - https://metacpan.org/module/Class::Agreement
* Class::Contract - https://metacpan.org/module/Class::Contract
* Sub::Contract - https://metacpan.org/module/Sub::Contract
Sub::Contract is my favourite because it's lightweight, pragmatic & with a more Perlish implementation.
From what I can tell, Cobra adds compile-time nil tracking (nice!) and contracts. I'd be extremely interested in this if I was still doing anything in .NET.
Selfishly, I wish the JVM was its primary target and not .NET.
Seems quite nice.