4 ms·
I read that as: less syntax, less leaky abstractions and less macros; and I mostly agree. I would add better integration with the C tool chain, more separation
by sifoobar 8y ago
I read that as: less syntax, less leaky abstractions and less macros; and I mostly agree.
I would add better integration with the C tool chain, more separation of concerns and less academic ego bullshit.
I've been working on something like that [0] lately.
https://gitlab.com/sifoo/snigl https://gitlab.com/sifoo/snigl
- fooker 8y agoI don't agree with 'less syntax'. More syntax (when designed well) results is significantly more readable code.
- hazz99 8y agoAda has a lot of syntax, but also gains a lot in terms of functionality (and arguably readability, but I disagree) for those extra characters. Syntax for the sake of syntax is pointless, imo. Obviously there's a balance here - APL and Applescript both suffer from either extreme.
- fiddlerwoaroof 8y agoI have a suspicion that something like APL is only a problem as far as the learning curve is concerned. For example, the syntax of advanced mathematics is nearly illegible to me but, for a physicist or mathematician who does this every day, it's the most efficient way of communicating information.
- sifoobar 8y agoHow much experience do you have from C, Forth & Lisp? Spend enough time in these languages and you start seeing the world differently. Less syntax (when designed well) doesn't have to be unreadable.
- fooker 8y agoHow much experience do you have with 10000 lines+ codebases written in Forth or Lisp? There is a reason people choose boring imperative languages for large projects. I did an internship at an 'Big 4' company which (from folklore) had a moderately large server written in Haskell, the codebase was a nightmare and eventually they ended up rewriting it in C++, which I believe they still use.
- sifoobar 8y agoNone, but that has very little to do with how capable the languages are in the hands of experienced coders. There's a ton of Forth being written in embedded circles, and several well known Lisp projects that are most probably even bigger. And that's fine, they can keep writing their big projects using dumbed down languages and fresh out of school code monkeys. But there is plenty of code written that doesn't fit into that description.
- fooker 8y agoSure, they are awesome languages. We are talking about readability though, which unfortunately means your code has to be readable by "fresh out of school code monkeys" and not just experienced coders.
- kazinator 8y agoSo the Haskell to C++ rewrite in your earlier example is supposed to be beneficial, because fresh-out-of-school code monkeys will understand it? How so if all they speak is JS and Python.
- fooker 8y agoSomeone only speaking JS or Python will have a significantly easier time with a C++ codebase than a huge Haskell codebase. You can have someone totally new to the project fixing bugs in a few days.
- lispm 8y ago
- wool_gather 8y agoUp to a point, perhaps. Say you have both `if` and `unless` control structures. Two keywords where you could have just one, but they're closely related enough that there's not much burden. But what if their grammar was completely different, like say: ifStmt := "if" "(" expression ")" statement ( "else" statement )? unlessStmt := "{" exprStmt exprStmt* "}" "unless" expression ";" I doubt this additional syntax would be a positive for the language's user. And the divergence will almost certainly make implementation changes more difficult. If we had instead: ifStmt := "if" "(" expression ")" statement ( "else" statement )? | "unless" "(" expression ")" statement This smaller amount of syntax is easily understood, increases expressibility, and `unless` will most likely be implemented as simple sugar, just a negation of the expression in an `if`. There's definitely some sweet spot in the middle, taking scan-ability and symmetry both into account.
- fooker 8y agoWould you same the same thing about loops? You can get away with just providing a 'while' loop (or maybe just goto and labels). Most languages end up with a for and maybe a repeat-until syntax for the sake of natural looking constructs.
- ASipos 8y ago"an embedded Forth with a Lisp in C" :) Sounds like the opposite of what the post is advocating.
- sifoobar 8y agoYet it's not; Forth and C are too primitive for most tasks, and Common Lisp too magical. Snigl aims to find a middle way. Programming languages will always be compromises, you always trade something in to get what you want. Anyone telling you otherwise is trying to sell you a new religion.