2 ms·
Unix shell scripts are fantastic for what they do. But most people find that it's easier (and more performant) to build, say, web applications using a programmi
by wanorris 15y ago
Unix shell scripts are fantastic for what they do. But most people find that it's easier (and more performant) to build, say, web applications using a programming language than by using shell scripts over CGI. Assuming you commit to a programming language, then you either then commit to multiparadigmatic programming and call out into shell whenever you need to do work like that, or you give up shell inside your program in favor of using the API tools inside the language. Outside of possibly perl, calling out into shell for things like that isn't very common anywhere I've ever worked, and with good reason.
Once you commit to a programming language instead of shell, then you have various types of IO to worry about. What you want might be in an array or list, a file, a database table, an xml file, or the response from a web service. Typically, you either need to write a decent chunk of code for each of these sources, either for abstraction or for marshaling.
With LINQ, all you need is a change in the upfront handling, and you can reuse the same comprehension logic across all the different data sources. This is a pretty nice deal, all things considered.
And really, one way of looking at adding comprehensions like this to languages is to make programming in languages more like chaining together code in a shell script -- something that programming in traditional Algol-descended languages is not normally like at all.