Comment Re:In Other News... (Score 1) 67
All you need to do is arm that glider, and it is an autonomous long range torpedo.
All you need to do is arm that glider, and it is an autonomous long range torpedo.
TeX (and more specifically LaTeX), are far more widely used in the mathematical community than MS Word. Most math departments expect or require you to use LaTeX to write your thesis, and possibly even your homework.
The math community is so deeply invested in TeX and it's associated tools that nobody would bother to switch to MS Word unless it somehow provided a capability that TeX or LaTeX can't, and that is very unlikely.
IBM acquires lots of new workers all the time as part of outsourcing deals. A company decides to use IBM for its IT and/or software development, and (if they're nice) transition their existing employees over to IBM. IBM accepts this as part of the deal, but they have to get rid of some people eventually and because attrition alone isn't enough they periodically lay people off.
It isn't necessarily pretty, but it's essentially part of their current business model.
Hiding local declarations in a nested scope is essentially encapsulation. Encapsulation is usually viewed as a GOOD THING among most programmers.
Encapsulation is a good thing, but remember that Pascal is a procedural language designed for structured programming, not object oriented programming. Pascal has certainly been updated to things like the Modula language family and stuff like Object Pascal (Delphi), but in standard run of the mill Pascal those features just weren't there. Pascal didn't even start out with modules; those came when Wirth designed Modula-2.
Now, I haven't worked much with Pascal, given that I'm probably much younger than you. But I have worked a lot with SML, and in SML nested functions are invaluable. In short, you can't get much work done without them, at least if you value somewhat clean and reusable code. Now, of course, you don't put big complicated things nesting inside each other there either, there's a module system to do that kind of encapsulation, but if you need one or two small helper functions inside a function body, local and let are your friends!
Aha! I think I see where our disconnect is. SML is a functional programming language, not an imperative language like Pascal, C, and Java. These are two different language families, and operate in qualitatively different ways. In a functional programming language, the ability to declare a function anywhere is essential, whereas in an imperative language the ability to do so is simply a feature.
I have a hard time understanding your assertion that using nested functions as intended leads to maintenance nightmare. My experience is exactly the opposite. Failing to use nested functions lead to uglier code, putting huge declarations inside a function is not what's intended (use the module system for that), and lifting stuff out, and adding a paramater is usually easy. But then again, our perspectives might differ.
Check out this response that I wrote to another post. I'd just give you the same example of how maintenance problems happen. Basically, it just gets messy, and nesting your functions and procedures just makes it a more complicated mess to sort out. In my experience, things turn to spaghetti code during the maintenance phase, so as a general rule I think that anything you can do that simplifies maintenance is probably worth it. To me, having all your procedures and functions at the same scope level makes maintenance much easier, and all other things being equal, it's the trade-off that I would make.
"The voters have spoken, the bastards..." -- unknown