4 ms·
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
by gravypod 10y ago
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 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.
- zdkl 10y agoSounds 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 10y agoOr a more pure, simpler LISP like a member of the Scheme family.
- zdkl 10y agoAcademically 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.
- seanmcdirmid 10y agoAs a counterpoint, APL was a very popular language in its day. Special symbols, very obtuse and concise syntax, heck, it even had a special keyboard. There are some niches where such choices can work.
- gravypod 10y agoHow many people use APL currently? Is it easy to find APL programmers?
- qwertyuiop924 10y agoKDB, a database built on a descendant of APL called K (which can be worked with through K and a slightly friendlier APL-like language called Q), is extremely popular in financial institutions.
- Athas 10y agoI know of a company (Simcorp) that uses APL extensively. It is probably pretty rare that they hire someone who is already a proficient APL programmer, and most of their hires probably don't know it at all. So they train them. It's not that hard to learn. Also, most of the APL programmers are experts in some other domain, usually finance, so they don't have too many preconceptions of what programming is like.
- seanmcdirmid 10y agoI did say "in the day", APL isn't so popular today, but it's successor languages get lots of use.
- vram22 10y agoIs J [0] one of those that gets lots of use? I have tried it a few times, and was impressed by its power [1] and compactness, but its rather cryptic syntax [2] put me off from going deeper into it. Might still try it more some day. [0] http://jsoftware.com/ http://jsoftware.com/ [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: http://www.paulgraham.com/power.html http://www.paulgraham.com/power.html
- otabdeveloper 10y ago> I think python is a good example of how to be simple. 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.