> Ultimately this: > FILE * test_file = fopen(“/tmp/test.txt”, “w+”); > Should become something like this: > create file /tmp/test.txt for input and output as test_file > Syntax highlighting should work instead of syntax notation just fine. I couldn't disagree more. The first example is easily scannable visually -- a variable is being created from a function call. I can tell because my eyes immediately notice the mid…
I think the OP perhaps wants to look at Apple Script?
If I were to invent a programming language for the 21st century
21–30 of 184 posts
Re: If I were to invent a programming language for the 21st century
#22I 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
"an embedded Forth with a Lisp in C" :) Sounds like the opposite of what the post is advocating.
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.
Re: If I were to invent a programming language for the 21st century
#23Maybe OP should learn COBOL :)
Re: If I were to invent a programming language for the 21st century
#24I 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
I don't agree with 'less syntax'. More syntax (when designed well) results is significantly more readable code.
Re: If I were to invent a programming language for the 21st century
#25Yes there's hype. It's not about hype. It's about exploring permutations of the tried and true. Applying what we've learned. You see a lot of composition over inheritance - not because composition is a new concept, but because we learned how inheritance can be bad. It's that simple.
Re: If I were to invent a programming language for the 21st century
#26> Ultimately this: > FILE * test_file = fopen(“/tmp/test.txt”, “w+”); > Should become something like this: > create file /tmp/test.txt for input and output as test_file > Syntax highlighting should work instead of syntax notation just fine. I couldn't disagree more. The first example is easily scannable visually -- a variable is being created from a function call. I can tell because my eyes immediately notice the mid…
There is a choice to be made as to whether amateur learning should be optimized (not that their example would be the result), or or a greater tie-in with the existing programming ecosystem should be. Both have their trade-offs, similar to the question of whether we optimize ease of learning or ease of use for experienced programmers (think BASIC vs APL).
Re: If I were to invent a programming language for the 21st century
#27Re: If I were to invent a programming language for the 21st century
#28Re: If I were to invent a programming language for the 21st century
#29I 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
I don't agree with 'less syntax'. More syntax (when designed well) results is significantly more readable code.
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.
Re: If I were to invent a programming language for the 21st century
#30Really, this is worse? FILE * test_file = fopen(“/tmp/test.txt”, “w+”); than create file /tmp/test.txt for input and output as test_file Yeah, remove the ; and duplication of type: let test_file = fopen(“/tmp/test.txt”, “w+”)
f = open("/tmp/test.txt", "w+")