▲ | fijiaarone 2 days ago | ||||||||||||||||
A modest proposal… Instead of having println() or it’s equivalent in your programming language, add a new special character that denotes a newline after a string: print(“Hello world”.) | |||||||||||||||||
▲ | Jtsummers 2 days ago | parent | next [-] | ||||||||||||||||
Is your idea that that would always work? Like:
Or only in `print`? If only in `print`, then you've suddenly made a context-sensitive grammar. And if the former, just use "Hello world\n" instead, since the tokenizer already supports that. | |||||||||||||||||
| |||||||||||||||||
▲ | coderedart 2 days ago | parent | prev [-] | ||||||||||||||||
That would mess with dot syntax usually reserved for method calls. Like rust's "hello".to_string(); | |||||||||||||||||
|