The Zimbu programming language
zimbu.org
zimbu.org
There are so many symbols, special cases, if ands and buts. When do things get $? When do things get ;? When do things get capitalized?
Making words capitalized shouldn't be needed. If your language is being used and the syntax of the language encompases more of then the meaning you are attemping to convey then you've poorly designed the language.
I think python is a good example of how to be simple. There are (), :, and whitespace. You have if, elif, def, and class (I'm not counting pass). The syntax and semantics are simple (although I don't like the reliance of whitespace as a block segregation technique).
It's hard to see the logic under the language in Zimbu. In python the logic is the language. When you see really pythonic code, the code are just expressing the ideas in a simple way using the language's keywords is a way to make it even simpler. For example
for account in database(outstanding_bill=True):
print(account.name)
As you can see, there is a syntax to this but it reads the same way as the program is meant to run. "For every account found in database that has outstanding_bills print the account name". The syntax is part of the meaning in this. In Zimbu..... I think work needs to be done. I'm just not getting it I don't think. > There are (), :, and whitespace. You have if, elif, def,
> and class (I'm not counting pass).
I'm a big fan of Python, but I'm not sure what you're trying to say here. There are way, way more than four reserved words in Python (including ones like `False` which aren't immediately obvious as keywords due to the different capitalization). There are also way more symbols used than those you list: [] for lists/comprehensions, {} for dicts/sets, single/double asterisks for unpacking, @ for decorators, all the familiar symbolic bitwise operators that C has, \ for line continuations, ; for multiple statements on the same line, etc.Decerators are something I am also not going to count as they aren't going to be the first thing, or even one of the most basic things, you will encounter. It's like counting "register" as a C keyword. It is buy you're likely to be able to go an entire lifetime without seeing it in a codebase.
In Python 2 True and False are not keywords. You can reassign their values. But I see what you mean and yes my list isn't comprehensive. It's an example.
The list would probably be more like (), {}, [], <, >, !, =, \, ',', :, ;, *, and @. For a basic programming experiance you you're probably not going to see or even care about a most of the nitty and gritty ones you describe in the contexts as you describe. You could even avoid using [] and {} by just writing "list()" and "dict()".
Basically I agree but again the point still stands. Python has far less clutter then what is demonstrated here. While python may have many really cool magic single-character operators most of them aren't really in your face. "!=" may be the most in your face one along side ":". In total the clutter is just not dumped all over your code or at least it doesn't seem like it is.
[1] It has some superb demos (which come with the basic install) of many kinds of apps, including up to the level of things like OpenGL graphics ones.
[2] Its succinctness [3] may be a virtue, though, once you get used to it, since programs in it are much smaller than in other languages (I'm guessing both due to its APL heritage and due to using a lot of symbols instead of words - based on what little I have read about it).
[3] That reminds me of PG's essay, Succinctness is Power:
I disagree. Python was a good example of that when it was Python 1.5.
Modern Python 3.5 is a Perl-style nightmare of special cases, weird sigils, ridiculous primitive types needed because of legacy reasons, inconsistent standard libraries and everything else that comes with being a 'serious' language.
Fully capitalized keywords make my carpal tunnel syndrome self recoil. Probably inspired from Modula 2 or BASIC?
At least I give the creator credit for picking a name that will be easy to search :-)
1. Space { } are three characters like e n d and using the idiomatic do when needed is only one more character (and the editor types end for me)
2. It looks better than an orphaned }
Other solutions:
1) Erlang has , instead of ; and . instead of } A long list of .s is not idiomatic (doesn't happen) but it would be pointless (pun intended) in a language where it does.
2) swallow the pill and use both braces.
Going the Python way (I suggest not using the : ) would be a radical change.
I also don't like the shouted COBOLish keywords. Were they necessary?
Thumbs up for the new regexp switch statement.
Also, just like you, I find that closing cascade of ENDs in nested statements is visual noise.
I'm of the opposite opinion, but for similar reasons. I type using the Dvorak layout, and typing curly braces is a bigger pain in the nipple than typing "end." For me, "end" also makes reading code blocks easier, because it looks like the end of a paragraph. In other words, the fact that it does read like a sentence makes it stand out more for me than curly-braces do; especially when coders, who obviously have no style, put the opening curly-brace on the same line as the function definition or control loop. Hehe.
I think it is interesting to contemplate the subjective aspects of languages and syntax preferences. Probably not productive, but interesting none the less.
if (condition) {
...
}
is the only readable option :-) if (condition)
{
...
}
drowns the code in a sea of (subjective) noise.There are many other variants https://en.wikipedia.org/wiki/Indent_style#Placement_of_brac... and wars have been fought over them. There are pros and cons for most of them. My tradeoff is the K&R style.
I think editors can automatically convert among styles nowadays. The only thing that matters is consistency.
Python has a solution to that problem but I think it's worse than the problem. end and } never gave me as many bugs in 30 years as having to reindent in Python did in one year.
I have written Python code since version 1.9 was first released, back in the 1990s, and I've worked on many large Python teams where we never ran into any issues with whitespace at all. We all set our tabs to 4 spaces, adhered to PEP8 formatting, and everything went as smoothly as any other language. I think it may just be what you're used to too.
case "foo"
when /hello/
when /oo/
puts "hi"
end
I guess the new thing is having to state that it is a regex, which I assume is needed as the langauge here don't seem to have regex literals but are reusing strings (seriously, why do languages keep doing that? Did they learn nothing at all from Perl?)However, 2 improvements that could be made are:
1) being able to write the code as normal (if instead of IF, else instead of ELSE) and then using something like:
zu.fmt
To format the code (best of both worlds?)
2) Dropping the ending-brace. It will just lead to many errors that could otherwise be avoided
---
Also, if you are interested in a similar language, maybe Nim might be worth a look:
Is that really true? An amazing amount of absolutely mission-critical infrastructure runs on code that was written once and probably never even code-reviewed.
The really ugly bit is the macro system: Nim macros are awful.
If I had a penny for every time I see you say that on HN... :)
In any case, I disagree with you. Nim macros are really easy to work with, the AST construction is a bit verbose but that can be easily remedied by writing functions which make the construction easier.
>that can be easily remedied by writing functions which make the construction easier.
That can only really go so far...
You can go look up the comments, if you like. I can't do another writeup on it at the moment, sorry to say.
Shipping Lua as a first-class alternative to VimL also happens to be the primary goal for Neovim in 2017.
What bothers me most is the monkey mascot. What relevance does a monkey have to this programming language? Is the idea that it's so simple a monkey could do it? Is the monkey Zimbu? It isn't explained anywhere, and I'm betting it's just some random animal they chose without any thought because it's cute.
At least the Go gopher makes a little bit of sense (GOpher). This monkey seems like a completely nonsensical choice though.
Possibly:
So, what is the incremental advantage to be gained by learning yet another new language?
What about lazarus/fpc?
I could easily drop a memo on a form and start giving it highlighting rules. I could easily connect to postgres and bring up a form with a grid and export it to excel. The pascal language itself is simple and works on multiple platforms.
Animal.C a = NEW() # a can only be an instance of Animal, not Fish.
LSP says, "wat?" ;)Although that only seems to be mentioned in the "Highlights" section and not in the language specification, so it's unclear if it's implemented...
https://en.wikibooks.org/wiki/Ada_Programming/Object_Orienta...