Comment on PeachPie Compiler: Compile and run PHP on top of .NET runtimeparentComments−bob10291yC# has poor man's PHP baked in these days:https://learn.microsoft.com/en-us/dotnet/csharp/language-ref...And, it's getting better over time:https://github.com/dotnet/csharplang/issues/4935This is essentially how I respond to web requests in my codebases right now: var table = $@"<table> <tr><th>Name</th></tr> {string.Join('\n', items.Select(i => $"<tr><td>{i.Name}</td></tr>"))} </table>";−okeuro491yThe defining feature of PHP isn't really string templating, but its shared-nothing architecture.https://slack.engineering/taking-php-seriously/I would consider poor man's PHP as something to reimplement that architecture, rather than any particular language feature.−eterm1yHi, my name is: <script>Alert("hi")</script>−pjmlp1yI fail to see why anyone sane would use this way over Razor files.−bob10291yI use it to avoid the gauntlet of AspNetCore dependencies and weird editor bs around cshtml files.−pjmlp1yKind of makes my point then.
Comments
C# has poor man's PHP baked in these days:
https://learn.microsoft.com/en-us/dotnet/csharp/language-ref...
And, it's getting better over time:
https://github.com/dotnet/csharplang/issues/4935
This is essentially how I respond to web requests in my codebases right now:
The defining feature of PHP isn't really string templating, but its shared-nothing architecture.
https://slack.engineering/taking-php-seriously/
I would consider poor man's PHP as something to reimplement that architecture, rather than any particular language feature.
Hi, my name is:
I fail to see why anyone sane would use this way over Razor files.
I use it to avoid the gauntlet of AspNetCore dependencies and weird editor bs around cshtml files.
Kind of makes my point then.