Earlier quoted context omitted.
No, I got it all right, that's what I meant. Each user subsets word for themselves in to what they need/can handle.
No, that's still not my point. Each user has a different subset of Word. Hence, the only set that contains all of the features that all users use is Word itself. If everyone uses a different subset, it's not accurate to call it bloated, too large, or complain it has unnecessary features. All features are necessary for someone.
C++ in Coders at Work
161–170 of 174 posts
Re: C++ in Coders at Work
#162Earlier quoted context omitted.
It was more the other way around, I think. Implementers had a lot of power to say, "No, this can't be done efficiently," and as a result, the burden was passed to programmers instead. Can you give an example of a "pet construct" (aside from major features like multiple inheritance and exception handling) that could have been left out?
I think operator overloading, which seemed like a 'great idea at the time' with some forethought should have never been part of the language in the way it works right now. The times that I ran in to examples where it was used properly and elegantly I think it could have been done just as nice with a properly named function call. I think the way it workd came from the DSL camp arguing that you should be able to make i…
Re: C++ in Coders at Work
#163Earlier quoted context omitted.
Thus proving the authors point even further. It is funny how everybody really seems to have their own favorite subset of C++.
Just as Lisp programmers add new syntax and vocabulary to build custom languages, C++ programmers do the same by taking them away.
I'd say the justification for all of the large languages (like C++ and Common Lisp) is the same. You may not need all of it, but the features you do need will at least be standardized, compared to using a small language with ad-hoc extensions to achieve the same.
[ I here include the standard library as part of the language, for languages with extensive meta-programming support like C++ and Common Lisp, it makes little sense to distinguish. ]
Re: C++ in Coders at Work
#164Earlier quoted context omitted.
roughly 90% of the comments are from people who got a bad impression of C++ during the pre-standardization days Zawinski and Thompson are good, but they are not 90% of Zawinski, Thompson, Bloch, Eich, Ingalls, Armstrong and Steele. You're completely misrepresenting the gist of the article. The comments that really drop my jaw are the people who seem to hold up Java as a "better" C++. http://www.paulgraham.com/icad.ht…
i'm not so sure about that. a few months ago i was working on a project that involves amazon ec2 and s3. amazon gives you a bunch of command-line utilities, written in java, to perform various stuff. every one of them takes a second or two to start up, which really annoyed the heck out of me. that certainly wouldn't have happened if they were written in c++.
Re: C++ in Coders at Work
#165Earlier quoted context omitted.
I characterize C as a portable assembly language.
Sure, portable assembly language. With, you know, named variables, type abstraction, recursive function decomposition, infix expression grammar, heirarchical flow control constructs... just a bunch of silly tricks. :) Modern developers have gotten so used to the fact that C is "low level" that they tend to forget how low really low level coding is. There's a ton of "high level" language features in every 3GL, and tha…
Re: C++ in Coders at Work
#166Earlier quoted context omitted.
I think operator overloading, which seemed like a 'great idea at the time' with some forethought should have never been part of the language in the way it works right now. The times that I ran in to examples where it was used properly and elegantly I think it could have been done just as nice with a properly named function call. I think the way it workd came from the DSL camp arguing that you should be able to make i…
>done just as nice with a properly named function call. So instead of view = projection * model; you would prefer. view.SetVector(Multiply3x3matrixWith3x1Vector(projection.GetMatrix(),model.GetVector()); Should we allow floats an doubles to be multiplied with a'*' or should that use properly named classes
How does someone looking at the code know which parts of projection and model get multiplied here ?
At least make it:
view.setVector(projection.getMatrix() * model.getVector());
Because '*' applied to a model or a projection could literally mean anything, there might be many elements in those structures that are candidates for multiplication.By making it explicit what gets multiplied the code is less clear than it could be.
If they're simple arrays without further fields attached to them then you could do:
view = matvecmul(projection,model);
And that's pretty close to the overloaded example.Re: C++ in Coders at Work
#167Yet for some reason people still use it. The question is 'why'. For many cases (not all though), I think the reason is largely just institutional inertia - you stick with the devil you know rather than the devil you don't know.
Re: C++ in Coders at Work
#168Earlier quoted context omitted.
I think C models how the computer works a lot more closely than C++ (and no one would argue that C isn't carrying water out in the engineering world even today). IMO C++'s issue is precisely that it layers all of these leaky abstractions on top of the strict procedural model of C. For my money, developers are better off knowing two tools (c + some very high level language) rather than the spork which is C++.
I remember 'cfront', when it first came out, and to this day I haven't really changed my mind on how I felt about it, it's a much too bloated language compared to the elegance of C. If 'C' would have had a decent native string type I think C++ might not have happened ;)
Re: C++ in Coders at Work
#169Earlier quoted context omitted.
>done just as nice with a properly named function call. So instead of view = projection * model; you would prefer. view.SetVector(Multiply3x3matrixWith3x1Vector(projection.GetMatrix(),model.GetVector()); Should we allow floats an doubles to be multiplied with a'*' or should that use properly named classes
Actually, you sort of prove my point there. How does someone looking at the code know which parts of projection and model get multiplied here ? At least make it: view.setVector(projection.getMatrix() * model.getVector()); Because '*' applied to a model or a projection could literally mean anything, there might be many elements in those structures that are candidates for multiplication. By making it explicit what gets…
Multiplying matrices is no more weird than multiplying a float by an int or a positive and negative number.
Re: C++ in Coders at Work
#170Earlier quoted context omitted.
AutoCAD is not written in Lisp. It has been written in several languages, including C. AutoLisp is just a thin scripting layer. See the" rel="nofollow">http://www.fourmilab.ch/autofile/www/autofile.html>the autodesk file .
That 'thin' scripting layer has been used to program some pretty impressive stuff in the engineering and architectural world. Anyway, some more examples then: http://www.cliki.net/Application
Yes, I've seen people work wonders with AutoLisp. There was - probably still is - an application used for designing clothes. The designer creates, I think, a "size 8" and a lisp script generates the other sizes.
AutoLisp being lisp-like is really a happy accident. The Autodeskers chose Xlisp IIRC because it was free and embeddable. If they could have embedded a C-like language interpreter, they would have.
In fact later, AutoDesk introduced other languages and tried to push users onto them. But AutoLisp already had huge momentum.