3 ms·
You're complaining about Go syntax, which is one of the most readable languages out there but you like rust which looks like line noise?[1] Sometimes I have a
by 4ad 14y ago
You're complaining about Go syntax, which is one of the most readable languages out there but you like rust which looks like line noise?[1]
Sometimes I have a hard time convincing myself people don't post troll comments on HN.
[1]https://github.com/mozilla/rust/blob/master/src/libsyntax/parse/lexer.rs https://github.com/mozilla/rust/blob/master/src/libsyntax/pa...
- kyrias 14y agoMy first thought was that it looked like CSS o.O And somehow felt a bit like VB
- octo_t 14y agoLexers are notoriously complex and difficult to read. The one in Go[1] is also really difficult to grok. [1] - https://code.google.com/p/go/source/browse/src/pkg/go/scanner/scanner.go#142 https://code.google.com/p/go/source/browse/src/pkg/go/scanne...
- coldtea 14y ago>You're complaining about Go syntax, which is one of the most readable languages out there but you like rust which looks like line noise? Sometimes I have a hard time convincing myself people don't post troll comments on HN. And then, as an example of "bad Rust syntax" you link to the "lexer.rs"? As if a lexer in any language is a good example of it's everyday syntax? How about the very first example they give: http://www.rust-lang.org/ http://www.rust-lang.org/ >My first thought was that it looked like CSS o.O Because the top part of the source he linked to has just struct definitions, which is what CSS was designed like anyway. Would struct definitions in most common languages, like modern C or Go look any different? (including an {} object definition in JS)
- pcwalton 14y agoThat file is very ugly (it's one of the oldest files in the repository) and does not reflect the current programming style. The indentation is all over the place, the type names are not CamelCased, there isn't enough use of methods—`str::len()` is ugly compared to `"foo".len()`—and so on. (Of course, this isn't an excuse: we sorely need to refactor the compiler.)