Sign in
I Love that New Syntax Smell
C++ articles, code snippets, musings, etc. from Andy RichIf this is your first time here, you may want to check out my blog introduction.
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Tags
A day in the life
articles
errata
et cetera
musings
post responses
snippets
Windows Forms
Browse by Tags
MSDN Blogs
>
I Love that New Syntax Smell
>
All Tags
>
post responses
Tagged Content List
Blog Post:
Properties Part 2 - defining default properties
arich
Disclaimer. This is an ancient post. By the looks of it, I originally intended to write this almost a year ago, as a follow up to my scalar properties writeup . That was back when I was testing properties (and more exactly, default properties) and some of the design was still in flux. Now it's pretty...
on
10 Aug 2005
Blog Post:
Another good customer bug
arich
Reader Andy Neilson writes in with another bug: The current compiler implementation has some problems. If the variable is a field of this, then the compiler will die. For example: class MyClass { public: int i; void Foo() { array<int>^ x = {1, 2, 3}; for each (i in x) { if (i == 2) break; } } ...
on
13 Sep 2004
Blog Post:
I love when customers find bugs!
arich
Reader Rob Walker asks: Is there a neat way of handling dictionaries? I have a Dictionary<Guid, Object^> and want to iterate over the values. Currently I have to use the syntax: for each(KeyValuePair<Guid, Object^> v in dict) { v.Value ... } I can't find an invocation that would allow for...
on
9 Sep 2004
Blog Post:
.NET, 7.0, 2003, what's it all mean?
arich
A reader asked the question: Is .NET, in fact, the SAME THING as Visual Studio 7.0? Could it be possible that a developer with .NET would be able to simply open the project file and recompile without rewriting code? .NET itself is a runtime. Unfortunately, the word ".NET" has started creeping...
on
9 Jul 2004
Blog Post:
Pointer to String chars - Everett style
arich
Garrett asked: If the source text is in a CLR String, and we want to pass(even read-only) to unmanaged code, it appears that there is no way to get a pointer to the String's buffer directly. We have to use the marshalling stuff to get it there, which in itself makes a copy. Given that one of...
on
22 Dec 2003
Blog Post:
The native heap/managed heap barrier
arich
Garrett asks: You mentioned: class A{}; array ^ arr = gcnew array (10);. Are you saying that whidbey will support this? What is it doing to the native pointer? Boxing? Managed array of native pointers to native objects? This didn't work in Everett, but it will in Whidbey. It probably wasn't...
on
22 Dec 2003
Blog Post:
Clarifications on the array template, and some about the CLR namespaces
arich
Garrett returns with some observations: Damn Cool. My only reservation is that it doens't *resemble* a native array, but that's ok too :) In some ways that is far better than the alternative. I was never quite thrilled about the cryptic nature of managed arrays before. Yeah, us either. That...
on
19 Dec 2003
Blog Post:
Why you ought not pre-jit, and why it sometimes makes sense.
arich
So, Raj asks: Thanks for the explanation but what is the deal with the IL and JIT. Why not just prejit the code? Why not pre-jit the code? Class, you didn't do the required reading . :) Actually, there are a couple of optimization reasons why you don't pre-jit code. Most of it deals with this...
on
19 Dec 2003
Blog Post:
Dave strikes again, a basic description of how .NET works.
arich
Dave asks: i have tried some UI examples in the book, but it was quite slow. when I execute the program, it takes 1.5-2seconds to see the window on the screen, on the other hand plain win32 api creates window before 1st second. doesn't .net generate native win32 binary code? what does it load/do...
on
18 Dec 2003
Blog Post:
VC++ .NET Examples, a tiny Visual Studio timeline, how to participate in the Whidbey Beta
arich
Reader Dave commented: back to lack of visual c++ .net examples. I saw that there are lots of c# examples, this is good because C# is a new language and if i am correct, it is built for .net. there are vb.net examples, too, but there is not a visual c++ .net example displaying a window on the screen...
on
17 Dec 2003
Blog Post:
A little Q&A
arich
Reader Dave asks: I am using Visual Studio 7.0 (2002?). I turn on my computer in the morning, and run it until midnight and my visual studio is always open. however, it consumes 60-150MB Virtual memory, specifically when i use VisualPerl (I usually use Visual C++). sometimes i need to run two instances...
on
16 Dec 2003
Blog Post:
Mono, more on cross-platform
arich
Mono (very different from mono ), is, at its core, an implementation of the Common Language Specification - which we purposefully made public domain through ECMA . Mono is pretty cool, too, and I'm personally glad to see it. They even praise the standard Microsoft helped develop: The Common Language...
on
11 Dec 2003
Blog Post:
C++ feature "lag," native types on the GC Heap, a plug for some software I like
arich
Garrett points out: I *am* a tad sad that C++ tends to lag a generation behind C# on features in .NET. I realize that's likely due to the larger effort required, with less resources than C#, and it seems that C++ is less ...sexy... than C#, but it's still sad . :( Yes, it is true that C# is...
on
11 Dec 2003
Blog Post:
Will .NET be available for non-Windows platforms?
arich
I thought this deserved a post, and not be buried in a comment. Dave asks: Wow! it seems you are empowering c++ for CLR. will .net be available for non-windows platforms? IT ALREADY IS! Being Microsoft, you'd think .NET would be a Windows-only innovation. But, happily, it isn't. My buddy...
on
10 Dec 2003
Blog Post:
More questions, more clarifications.
arich
Garrett asked some further questions that were also good. Good enough, in fact, that I didn't know the answers. So I went down the hall and asked Brandon . I'll paraphrase what Brandon told me here. 1. What about partial types? What are partial types? For those of you unaware about partial...
on
10 Dec 2003
Blog Post:
Whidbey and Managed Extensions, clarifications.
arich
Garrett Serack made some comments on my last blog entry that I thought were interesting enough to share with everyone. He asks: And how about forward source-level compatability between .net 1.1 and whidbey? Is the current batch of Managed C++ gonna work just as well? Yes! One of our goals...
on
8 Dec 2003
Page 1 of 1 (16 items)