3 ms·
It's not perfect. There's a few strange things like calling function variables with the dot notation, but it's there for a reason, and the rest of it worth the
by dnautics 8y ago
It's not perfect. There's a few strange things like calling function variables with the dot notation, but it's there for a reason, and the rest of it worth the worst of the quirks.
Side note, I wish variable rebinding were off by default but allowed on names with a sigil (or a ! ).
- derefr 8y ago> a few strange things like calling function variables with the dot notation, but it's there for a reason I feel like anyone who has written a Yacc-based parser for programming-language syntax will appreciate Elixir's grammar even more for these "quirks." Elixir's syntax is as beautiful as it can be while also being explicitly unambiguous. Which means that the language syntax is very easy to change or extend—unlike other PLs I could name, where the set of parsing rules resembles a late-game Jenga tower. Or, to put that another way: Elixir isn't just a joy to use; it's a joy to be a core maintainer of. (How often have you ever heard anyone consider that part of a programming language's UX?) Oh, and this simple, explicit set of parse rules also results in a highly-predictable and regular AST, which means you can write an macro-based DSL library in Elixir—one that will actually works with any arbitrary Elixir code hanging out inside your macro body—in not-much code, and without worry that a minor language change in the future will break your lib.
- Bjartr 8y ago> fork and base your own programming language upon. (How often have you ever heard anyone consider that part of a programming language's UX?) Any time lisp macros come up?
- dnautics 8y agoThe dominant relational database system (Ecto) very elegantly dsl's databases.
- dnautics 8y agoSpecifically speaking the optionality (inexplicitness) of parens for function calls causes some parsibg difficulty. The compiler automatically assuming that a bare atom is a function call with () versus a variable, for example. However, this is really minor in the grand scheme of things, it really is one of the most beautiful pls otherwise