This is my first post, so please let me introduce myself and explain my impressions on Cobra.
WARNING: Long post (non native english) OMG!
TL;DR Was a programmer, still my passion. I like Cobra. I would like to help.
My first real job was as a Java programmer in the Javabeans, EJBs era. We used IBM VisualAge (made in Smalltalk!!). Java never convinced me, because years before, in university, I knew the Eiffel language, which was better (in my opinion) to Java and C derivatives. After 5 years I changed my job to teaching and I have more free time, as you will see by the extension of this post.
I found Cobra through Mono platform. Some good points are:
- The “pythonic” syntax is clear, no strange symbols, natural for algorithms and teaching.
- In Cobra you don't need to put a semicolon in blocks like in Python.
- No 'self' is needed in every method like Python.
- Cobra has uniform access. The access is the same no matter if it is a variable or a calculated value.
- Preconditions, postconditions, invariants. Important for me. Used with abstract classes or interfaces makes not only an API but a
contract. - Interoperable with .NET / Mono.
- Static typing.
- Generics. A must. See complaints to Golang about generics in blogs.
- Good performance.
- Not hyped
The first time I tried Cobra, I didn't catch it. I use Linux. I'm not familiar with .NET/Mono ecosystem. A lot of FUD against Mono. The
documentation was difficult to read (sorry). I miss an API with all the methods of core classes like the one that is generated with
`-doc` for every class (and with preconditions, postconditions and invariants included like part of the documentation).
In 2014, I remember looking in Google code jam's the submissions made by nerdzero (hello, well done!). Cobra's code can be easily understood without knowing Cobra!, is pseudo-code!. It's like a scripting language but with static typing.
So I'm trying Cobra again. I resolve problems of bio-informatics in [url]rosalind.info[/url] just for practice. I made the first problems in
different languages to compare them. Cobra problems are usually shorter in code, faster execution. The code is better in the sense
that has an specification with it. I only did that with the other languages in an informal way (just in my mind). If you have a look to
some problems in Rosalind you will see how easy the specification of the problem are mapped into Cobra with preconditions, postconditions and the test sample in the same method.
Cobra is a mix of good things but none of them are revolutionary. The advantages of using it are only visible after a period of study
and education. Only with a big enough codebase and years of supporting the same project, things like design by contract, static typing or clean syntax are noticeable . Quality sometimes is boring, only pays in the future and a lot of times can go unnoticed.
I don't see any real problem in Cobra, only small details that can fulfilled with the help of the community. I offer my humble help to
improve the situation. We are fortunate to have a tool with (let's say) 60% of features of a professional product that costs thousands of dollars.
Sorry for this loooong post. Thank you for your attention