|
There seems to be a return to the classic ASP days of embedded code and HTML with MVC and Razor (sloppy, unmanageable and simplistic) as well as the ASP days of everything being a variant
Dim intValue, strValue
Not one decade ago everyone was praising the escape from this with the new ASP.Net and C#; for what reason return to this script-kiddie madness; the more recent "new" technologies seem determined to reverse this progress. There are already languages for this such as PHP.
This is a sample of the innovation in Razor:
<ul id="ul_1_id">
@foreach(var p in list1)
{
<li>@p.Text(...)</li>
}
</ul>
Might as well install classic ASP
|
|
|
|
|
..but i'll stick to compile-time type safety
|
|
|
|
|
I was expecting that to be the least popular answer.
|
|
|
|
|
been around for a while, you should probably at least know what it is to at least be able to know if its applicable to your projects, then you can truly make informed decisions, even if you don't end up using it...
|
|
|
|
|
Nah, I'll rather just ignore it.
Chances are that if the majority of people haven't even heard of it, it's not gonna be around for long.
|
|
|
|
|
The majority of people have never heard of the Isua Greenstone Belt but that has been around for billions of years
|
|
|
|
|
True
Just look at WPF
|
|
|
|
|
|
WPF - Windows Presentation Foundation
Not my doing - honest.
|
|
|
|
|
haha, I wasn't being serious
|
|
|
|
|
You can get an idea from here[^].
Totally shameless!!!!
|
|
|
|
|
Nice article but I don't think I'll be using it somehow. I can't think where I would ever need to use that.
Can you give me a real-life example of where you have used it?
|
|
|
|
|
In honesty, I haven't used it in earnest yet, I wrote the article as .net 4.0 it was coming out of beta, I like to stay on top of developments in the language.
For "straight" c# code I would advise against the DLR use, it gives you a good long bit'o'rope with which to hang yourself by breaking the statically-typed goodness in a statically typed language.
Where it does come into it's own is when you are interacting with dynamically typed languagues, where it will handle duck-typing without a lot of ugly nonsense. Examples would be interacting with JavaScript or Ruby for example. I will be using the DLR pretty soon no-doubt, I've gone back to web development after a good long break (been teaching for the last year, and on desktop appps for the the couple prior to that) and I've decided we should use MVC (see Judah's post below).
The dynamic stuff has been pretty controversial, and I understand the reasons for this. IMO it does fulfull a purpose and if you don't want your static typing broken, you don't have to use it.
|
|
|
|
|
Any code that uses the "dynamic" keyword in C# is using the DLR. Any code that consumes dynamic types is using the DLR.
All new ASP.NET projects that use the MVC 3 or later framework use the DLR because of the dynamic ViewBag object.
Also, if you're doing COM interop, it's quite likely you're using the DLR and might not realize it.
I think a lot of people use the DLR, only they don't understand they are doing so.
Religiously blogging on the intarwebs since the early 21st century: Kineti L'Tziyon
Judah Himango
|
|
|
|
|
I am one of them.
I used COM interops in my applications but never knew that i am using DLR.
|
|
|
|
|
for it to become obsolete, so i can ignore whatever replaces it, too.
6 months, max.
|
|
|
|
|
Two choices in favor and four against DLR. Do I smell some sort of bias?
Another thing is that I miss some choices:
- in the R&D queue
- evaluating
- read about it
etc.
Cheers!
|
|
|
|
|
Manfred R. Bihy wrote: Do I smell some sort of bias?
No, that's bacon frying.
|
|
|
|
|
mmmmm... bacon....
|
|
|
|
|
viaducting wrote: No, that's bacon frying.
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
You see, the project I'm supporting now, was written a loooong time ago. When .NET was still 1.0 and JScript.NET was all the hype.
Some parts of the system are so tightly depends on eval() and other such sinister things that it wasn't possible to gradually refactor the code to less stinky design.
Not so long ago I pushed everyone to move to the .NET 3.5, so we all can benefit from Linq and other less important fluffy stuff, but I think it won't be soon until we move further.
And only .NET 4 with its DLR features has some potential to rub the balm in old wounds. But maybe it'll become obsolete with some luck and we'll throw it away altogether.
TL;DR: Javascript was available for .net for a very long time (and other dynamic languages as well). But .NET 4.0 is here to make things easy to use and it might be useful.
|
|
|
|
|
Does it stand for Dumb Luck Redneck?
|
|
|
|
|
There is little love for dynamic languages in Microsoft eco-system, wich I find a little sad; dynamic languages are no panacea but they do have their place: for instance, writing web UI code with a static language such as C# is a waste of time.
Anyway, I do play with IronScheme[^] occasionaly, and that is a dynamic .NET language, but apparently does not use DLR.
|
|
|
|
|
--
You don't hire a handyman to build a house, you hire a specialist.
|
|
|
|
|
Or BACON?
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|