7 ms·
The Zimbu programming language
- pjc50 10y agoI see someone misses BASIC's all-caps keywords.
- jonathonf 10y agoIt does make them easy to spot, though.
- brokencode 10y agoSo does syntax highlighting. For me, typing with caps lock has always felt awkward and unnecessary.
- bhritchie 10y agoThis is by Bram Moolenaar, author of Vim: http://www.zimbu.org/Home/about-zimbu http://www.zimbu.org/Home/about-zimbu
- nephrite 10y agoThis guy makes a great text editor, but vimscript is awful. He must refrain from making programming languages.
- qwertyuiop924 10y ago...Well, that explains its quirks.
- sker 10y agoThe closing curly braces without opening ones make me go full OCD.
- jonstokes 10y agoWith 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
- kevin_thibedeau 10y agoWhy is IO a keyword?
- hota_mazi 10y agoThe 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 10y agoReally. 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 10y agoI 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.
- pmontra 10y agoA cascade of end or a cascade of } is a bad smell about the code. I try my best to avoid that. 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.
- innocentoldguy 10y agoI like Python's relevant whitespace. It forces sloppy coders to organize their code in a more readable fashion. People who use tabs throw a wrench into the works, of course, but forcing them to fix the issues they've caused typically ensures it won't happen again. 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.
- hota_mazi 10y agoUsing 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.
- al2o3cr 10y agoAnimal.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 10y agoYou 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_Orientation#Class-wide_and_specific_types https://en.wikibooks.org/wiki/Ada_Programming/Object_Orienta...
- al2o3cr 10y agoThe 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.
- phantom_oracle 10y agoThe 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 10y agoNim... urgh. It's a bit quirky, bit kind of nice. The really ugly bit is the macro system: Nim macros are awful.
- dom96 10y ago> 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 10y agoI 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...
- nimmer 10y agoYou keep repeating that without describing how in comparison to other languages.
- qwertyuiop924 10y agoActually, I've gone into quite a bit of depth about how it fares in comparison to other languages. :-) You can go look up the comments, if you like. I can't do another writeup on it at the moment, sorry to say.
- audunw 10y agoHow old is this? The pitch reads exactly like a description of the Nim language, and then it claims no such language exists..
- Dinius 10y agoSite activity on the bottom of the page goes back to February 12, 2009
- gravypod 10y agoSimplicity 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 10y ago> 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 10y agoI 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.
- moomin 10y agoSomeone 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...
- justinmk 10y agoThe 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 10y agoWhat 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 10y agoWhat 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
- nurettin 10y ago>> 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.
- roystonvassey 10y agoAs 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?