Archived

This topic is now archived and is closed to further replies.

Anthracks

How compliant is Visual Studio .NET?

Recommended Posts

Anthracks    122
Has anyone here beta tested the new Visual Studio .NET? I''m curious as to how much better it is than VS6''s oh-so-wonderful STL and general template support...does it actually at least pretend to comply with the standards? Thanks, Anthracks

Share this post


Link to post
Share on other sites
Julio    116
I have the cd''s but haven''t installed them. guess I should try it out.


Never underestimante the power of stupid people in large groups.

Share this post


Link to post
Share on other sites
Gorg    248
I can''t seem to find the article, but the short answer is no it does not. What the article said is that they were too busy making VC++ works with .net that they did not had the time to fix all the standard issues mainly partial template specialization(which is needed for full standard stl support).

They said maybe next version of .net. That would be in 2 years I guess!

Share this post


Link to post
Share on other sites
Martee    476
Pure Microsoft? Oh, you mean like SOAP, XML, C#, and the CLI? (Hint hint: these are all standards).

~~~~~~~~~~
Martee

Share this post


Link to post
Share on other sites
Kylotan    9859
Martee, you''re implying that Microsoft invented XML, which they did not. XML was developed "by an XML Working Group (originally known as the SGML Editorial Review Board) formed under the auspices of the World Wide Web Consortium (W3C) in 1996. It was chaired by Jon Bosak of Sun Microsystems with the active participation of an XML Special Interest Group (previously known as the SGML Working Group) also organized by the W3C." (http://www.w3.org/TR/2000/REC-xml-20001006#sec-origin-goals)

Share this post


Link to post
Share on other sites
Martee    476
Nononono. You misunderstood me.
I was referring to the ".NET is all proprietary Microsoft stuff - who needs standars?" idea. I know that MS didn''t invent XML. They also didn''t invent SOAP (although they were major contributors to its development). My point was, .NET relies heavily on standards, many of which were not developed by Microsoft.

~~~~~~~~~~
Martee

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
I''ve been playing around with VS.NET Beta 2 for a couple of days. Here''s some code I threw together to test out VS.NET''s standards compliance. None of this stuff works in VC6, all of it works in VC7.

  
#include <list>
#include <vector>
#include <string>
#include <iostream>
#include <algorithm>

// dim_of returns the dimensions of an array. This is better than

// the typical #define DIM_OF(arr) (sizeof(arr)/sizeof(arr[0]))
// for a variety of reasons, but specifically, it prevents pointers

// from accidently being passed.

template <typename T, std::size_t N>
inline std::size_t dim_of(T (&)[N]) { return N; }

#define DIM_OF(arr) (sizeof(arr)/sizeof(arr[0]))

// A::Clone() differs from B::Clone() only by return type, but

// since B is derived from A, the standard allows this.

struct A {
virtual A* Clone() const = 0;
};

struct B : A {
virtual B* Clone() const = 0;
};

// A simple tester for later (note that Go''s return type is void)

class Whatever { public: void Go() {} };

int main()
{
// Convert ANSI string to Unicode

std::string str = "Hello";
std::wstring wstr(str.begin(), str.end());

// Play around with all sorts of new things

int myArr[5] = { 1, 2, 3, 4, 5 };
std::list<int> myList(&myArr[0], &myArr[0] + dim_of(myArr));
std::vector<int> myVect(myList.begin(), myList.end());

// Test out dim_of vs. DIM_OF

//dim_of(str.c_str()); // GOOD: This won''t compile.

DIM_OF(str.c_str()); // BAD: This does compile.


// Test mem_fun with a function returning void. The standard allows for

// void functions to return "values" in certain case in order to make

// template writing easier.

std::list<Whatever*> wList;
std::for_each(wList.begin(), wList.end(), std::mem_fun(&Whatever::Go));

//return 0; // "return 0" from main isn''t necessary in C++ anymore

}

Share this post


Link to post
Share on other sites
Kylotan    9859
Anonymous:

I am glad that the initialising of 1 container type from another is working in the new VC++. Although, this was not a MSVC problem as such, it''s because they use an old STL in VC6 which isn''t very generic as far as iterators go, sadly. Although VC5 couldn''t compile templatized member functions, VC6 can, it just doesn''t take advantage of this since it still has VC5''s STL.

Share this post


Link to post
Share on other sites