How do you print?
Options:
- Python 2/PHP style:
print "text";orecho "text"; - Python 3 style:
print("text"); - C++ style:
cout << "text" << endl; - C# style:
Console.WriteLine("text");
We should mix the verbosity of C#/Java with the ugly syntax of C++.
Console.StandardOutputStream << "text" << Console.Characters.EndLine;
I second that motion...
On Sun, Jun 18, 2017 at 1:28 PM Andrew Sun͈̮ [email protected] wrote:
We should mix the verbosity of C#/Java with the ugly syntax of C++.
Console.StandardOutput << "text" << System.EndLine;
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/PyHP-pph/PyHP_pph/issues/35#issuecomment-309294274, or mute the thread https://github.com/notifications/unsubscribe-auth/ASo3UbWzQkgh0UA3zbBR4PrIpKkrH8c6ks5sFWw2gaJpZM4N9kVP .
Sounds good, but now we need to have a specification for streams.
We should also take from python2 and have Console.StandardOutputStream not be a stream, but a special language construct. It should look exactly like a stream though.
So it looks like a stream, but it's really just a special syntax just for that? You're a genius.
We need to add in some Python as well.
Console.StandardOutputStream << print("text") << Console.Characters.EndLine;
But I've always thought print() was a bit misleading... Screw convention, let's use disp() (short for display)!
Console.StandardOutputStream << disp("text") << Console.Characters.EndLine;
And the chevrons should point forwards to indicate a progressive language.
Console.StandardOutputStream >> disp("text") >> Console.Characters.EndLine;
Of course, the meaning is the same. Only the chevrons should change.
I'll turn this into a PR.
If I'm understanding right, you're suggesting a special syntax of "Console.StandardOutputStream >> disp(string here) >> Console.Characters.EndLine;"? That's fantastic. Absolute support.