I'm a newbie here on DIC and I've made an interesting observation. I'll put on the flamesuit, but still, please be gentle. It's my first time.
The use of "non-standard headers and libs" seems to be highly discouraged here in DIC. On the top of the list of seems to be the various headers and libs that come with Turbo C++. Next to the top of the list seems to be the use of any Windows/DOS specific headers like MSVC's "conio.h".
So my questions are:
What is the exact definition of a non-standard header or library?
Before there was gcc and MSVC wasn't even scaring Borland, Turbo C++ was king. It is because times have moved on and Turbo C++ is now passe that makes the Turbo C++ headers and libs "non-standard"?
From what I can glean from the posts about not using "non-standard headers and libraries" is that part of the definition seems to involve whether something is in the C++11 Standard or not and whether it is implemented correctly by the compiler and/or library.
VS2010's C++ parser and library is falling behind from the current C++11 standards, and doesn't implement all of C++TR1, much less C++03. Does that make the use of VS2010 headers and C-runtime also "non-standard"?
What I find slightly amusing is that after saying that "conio.h" "graphics.h" is not part of the language standard, very shortly the post will say something about about use "ncurses.h" or "windows.h" instead. Why is it okay to use these headers that are not part of the language, but not the older "conio.h" and "graphics.h" which are also not part of the language? Is the sticking point that the old "conio.h" and "graphics.h" had functions not prefixed with an underscore? But then the ncurses and Windows APIs also don't have leading underscores in their functions, so it must be some other criteria.
If I used "termbox" instead of ncurses will I get the same kind of don't use "non-standard" library warnings here in DIC?
If I use the old DirectX 9 Managed DirectX library, is it considered non-standard and that people will say I should use XNA instead? If I choose to use SlimDX, is that non-standard?
Is there a DIC definition of what is a standard library? Or is it like porn? You'll know when you see it? Consider that one man's porn, is another civilization's temple decorations.
Is it bad to use platform specific code, libraries, APIs in code posted to DIC?
I posted some code that used the MSVCRT specific _getch(). I got comments about use of "non-standard" functions that only work on Windows/DOS despite the fact that the code I was commenting on was obviously Windows specific and using the MS Visual C++ Runtime Library. What makes _getch(); any different from system("pause");? The latter hardly seems to draw any comment despite it only working on Windows/DOS. Or have people just gotten used to seeing system("pause"); that it's a common idiom?
Or does it depend on the context? If somebody is asking a platform specific question, then it's okay to use platform specific stuff, but if the question is a generic language or algorithm question, then only "standard" stuff should be used?
How to deal with C# questions where somethings may be in one version of the Framework, but not another? Should LINQ be used?
What frameworks and libraries are considered standard and what is not?
Of these libraries what is considered standard:
jQuery
Boost
ATL
MFC
WTL
NUnit
xUnit
JUnit
ziplib
DotNetZip
DooPHP
Django
SharpUsbLib
Berkeley DB
Sqlite
Hibernate
NHibernate
db4o
Entity Framework
Log4Net
Unity
autofac
Spring.NET
Castle Windsor
XNA
This post has been edited by Skydiver: 06 July 2012 - 12:33 PM

New Topic/Question
Reply



MultiQuote












|