7 ms·
It's unfortunate that people are downvoting you because "that's just how it is in stack-based languages". Maybe stack-based languages are indeed less readable t
by tom_mellior 6y ago
It's unfortunate that people are downvoting you because "that's just how it is in stack-based languages". Maybe stack-based languages are indeed less readable than alternatives. Pointing this out should ideally encourage discussion rather than downvotes.
The language's developers themselves seem to agree that postfix syntax isn't always best: The syntax for the type "list of characters" is "List<Char>", which is not postfix. Compare ML-family languages, where this would use postfix syntax, writing this type as "char list".
- caslon 6y agoPostfix is incredibly intuitive. It's much simpler to read than alternatives. Your proposal is wrong.
- creata 6y ago> Maybe stack-based languages are indeed less readable than alternatives. That may be the case, but taking a core language feature and commenting "I don't like it, change it" isn't a very effective way to encourage discussion, in my opinion.
- tom_mellior 6y agoIt's a form of feedback. Yes, it would have been better feedback if the author had also supplied an example of how they think this could be improved. But I don't believe that that should be required. Anyway, here's a rough idea. Introduce some special token, like : for example, and add a special syntax rule in the parser that "a: b" is parsed as if it had been written "b a". Then people who find it more readable can write say: "hello" while others can continue to write "hello" say and surely everyone would be happy!
- yiyus 6y agoI am quite sure that if I went to a thread discussing Go or Rust (for example), and I said something along the lines of: "I don't like this, it would be more readable if you did like Forth", I would get downvoted too. And rightly so. We can have discussions about the convenience or readability of different syntaxes, but if the arguments are going to be of the level of "I don't like it", then a downvote is a valid response.