How can you compare that, to a simple `@` symbol? ERB (or even Mustache for that matter, feel like a relic compares to Razor.
I don't think you are doing an objective evaluation.
1. All goddamn editors can be configured to do a short key for the expression(I have mapped \1 to `<% %>` and \2 to `<%= %>`)
2. If that is too much of work, use Haml http://haml.info/tutorial.html or Slim http://slim-lang.com/
# slim
- persons.each do |person|
p = person
# haml
- persons.each do |person|
%p = personAre you kidding me?
Slim looks like something much MUCH better than the crufty old ERB.
And what difference it makes if it comes with Rails or I have to add an entry to Gemfile? Ruby has many different templates. What comes bundled with Rails is totally up to creators. DHH is opposed to haml https://twitter.com/dhh/status/58289541068492800 and hence, erb is the default which is unlikely to change.
They don't even have to accommodate alternate templates(which they do seamlessly). Do you cry a river every time you have to use a library which doesn't come bundled with .net?
> Slim looks like something much MUCH better than the crufty old ERB.
And it's better than Razor's crufty syntax as well.
But please keep tooting your horn about your Razor. I have wasted enough time here.
If it matters, it'd take about an hour to put together a wrapper to let you use the @foreach ... { } syntax with Rails. Nobody bothers because this is about item #1045 on the list of pain points in web development.
FWIW: For my part I consider it a massive smell to have what appears to be code in the templates, which is why I prefer Mustache and similar which explicitly force the logic to be kept separate, so to me the Razor example and ERB examples look equally hideous.