
The Zimbu programming language - mpweiher
http://www.zimbu.org/
======
gravypod
Simplicity is the most difficult thing to engineer. I think this is a good
example of that.

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.

~~~
kibwen

      > 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.

~~~
gravypod
I meant to start. They may be pervasive throught the community but you don't
need to know about them as you may not even see them for the first little
while.

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.

~~~
zdkl
Sounds like what you want is clojure. Once you know what ()[]{}#'@ mean, you
only need to basically understand the couple dozen "stdlib" functions and
you're good to go.

~~~
hashkb
Or a more pure, simpler LISP like a member of the Scheme family.

~~~
zdkl
Academically sure, in the real world I think Clojure has more advantages in
terms of tooling, evolution potential and community/ecosystem. Aside from the
"nitty gritty" aspects related to being hosted on the jvm I find clj to be the
superlative of simpleness.

------
hota_mazi
The unbalanced brace is a disturbing choice. Why not go either full braces (C,
Java) or full space significant (Python)?

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 :-)

~~~
pmontra
Really. I thought about that when I saw Ruby 10 years ago and didn't like to
type end to close blocks. However

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.

~~~
hota_mazi
I prefer the braces over END not because of the character count but because my
brain can't avoid reading "end" when I read the code, while closing braces
don't cause a word to pronounced in my mind.

Also, just like you, I find that closing cascade of ENDs in nested statements
is visual noise.

~~~
innocentoldguy
That is an interesting reason. It may seem small, but I think it is a
perfectly valid point.

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.

~~~
pmontra
Speaking of subjectivity,

    
    
        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...](https://en.wikipedia.org/wiki/Indent_style#Placement_of_braces)
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.

------
bhritchie
This is by Bram Moolenaar, author of Vim: [http://www.zimbu.org/Home/about-
zimbu](http://www.zimbu.org/Home/about-zimbu)

~~~
qwertyuiop924
...Well, that explains its quirks.

------
jonstokes
With the orphaned closed curly braces and ALL CAPS keywords, it's like this
language was created to make programmers twitch uncontrollably. The only thing
he could do to make this more off-putting would be to mandate some kind of
crazy double-tab indentation scheme. :-p

------
phantom_oracle
The language does make a strong case for "code is read more than it is
written", so it does make it easier/cleaner to quickly see the keywords, etc.

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:

[http://nim-lang.org/](http://nim-lang.org/)

~~~
qwertyuiop924
Nim... urgh. It's a bit quirky, bit kind of nice.

The really ugly bit is the macro system: Nim macros are awful.

~~~
dom96
> 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.

~~~
qwertyuiop924
I _do_ say it a lot. But it _is_ true.

>that can be easily remedied by writing functions which make the construction
easier.

That can only really go so far...

------
moomin
Someone else has already observed that the motivation pretty much exactly
matches Nim's. However, if you just decide that you don't need a compile to C
language, Go or even Haskell matches the criteria...

~~~
dom0
or rust

~~~
masukomi
or Chicken Scheme (and many of its friends)

------
audunw
How old is this? The pitch reads exactly like a description of the Nim
language, and then it claims no such language exists..

~~~
Dinius
Site activity on the bottom of the page goes back to February 12, 2009

------
pjc50
I see someone misses BASIC's all-caps keywords.

~~~
jonathonf
It does make them easy to spot, though.

~~~
brokencode
So does syntax highlighting. For me, typing with caps lock has always felt
awkward and unnecessary.

------
justinmk
The previous discussion[1] made a good case for Lua.

Shipping Lua as a first-class alternative to VimL also happens to be the
primary goal for Neovim in 2017.

[1]
[https://news.ycombinator.com/item?id=895350](https://news.ycombinator.com/item?id=895350)

------
autismo
What bothers me most about this language isn't the orphaned braces, or the
case sensitive keywords or any of the other quirky decisions.

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.

~~~
isxek
_What relevance does a monkey have to this programming language? Is the idea
that it 's so simple a monkey could do it?_

Possibly:

[http://dilbert.com/search_results?terms=Zimbu+The+Monkey](http://dilbert.com/search_results?terms=Zimbu+The+Monkey)

------
sker
The closing curly braces without opening ones make me go full OCD.

------
roystonvassey
As an aside, and from a non-CS person's perspective, what is the need for more
programming languages? I find at least one new one every few days on HN. I've
been learning Python since late 2015 and I find just mastering one language
(and its libraries) overwhelming.

So, what is the incremental advantage to be gained by learning yet another new
language?

------
nurettin
>> No existing language really meets these demands, so let's create a new one
that does!

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.

------
al2o3cr

        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...

~~~
junke
You have the same in Ada, where Animal denotes the exact type, and
Animal'Class the class-wide type (type and any subtype).

[https://en.wikibooks.org/wiki/Ada_Programming/Object_Orienta...](https://en.wikibooks.org/wiki/Ada_Programming/Object_Orientation#Class-
wide_and_specific_types)

~~~
al2o3cr
The Ada variant seems to achieve a clearer goal: specify exactly where LSP /
subtyping is desired, leaving the default behavior of un-decorated types
alone. Explicit opt- _out_ as in Zimbu seems odd.

------
hota_mazi
Using capitalized keywords in order to make it easy to add keywords in the
future reveals the author is probably not very familiar with the science of
parsing. It's quite possible to introduce new keywords in future versions of
the language and make sure your compiler won't choke simply because the word
is being used as a variable name instead of an identifier.

------
kevin_thibedeau
Why is IO a keyword?

