News for hackers. Stuff that matters.
Re:Titania Programming Language by fijiaarone on Sunday September 14, 2025 @08:44PM (#45244867)
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”.)

Re:Titania Programming Language by Jtsummers on Sunday September 14, 2025 @09:55PM (#45245270)
Is your idea that that would always work? Like:

  s := "Hello world".; -- equivalent to "Hello world\n"
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.
Re:Titania Programming Language by keithnz on Monday September 15, 2025 @12:19AM (#45246069)
I think the point is to add the correct end of line depending on OS.
Re:Titania Programming Language by kouteiheika on Monday September 15, 2025 @05:51AM (#45247915)
The correct end of line is always '\n'. Even Windows' Notepad supports it nowadays. I will gladly die on this hill. :P
Re:Titania Programming Language by coderedart on Sunday September 14, 2025 @09:34PM (#45245169)
That would mess with dot syntax usually reserved for method calls. Like rust's "hello".to_string();
Re:Titania Programming Language by cxr on Sunday September 14, 2025 @09:37PM (#45245182)
Oberon doesn't have string methods (and people who opt not to parenthesize for cases like that deserve the punishment).