Wednesday, March 01, 2006
You really want to download and read http://www.gotw.ca/publications/C++CLIRationale.pdf. It's 54 pages (just under 2 MB) of WHY the C++/CLI product is the way it is. Why isn't it a library? (Because the compiler really needs to be in on what you're doing to hook in the runtime support properly.) Why doesn't it use underscores? (Because programmers hated them.) You don't have to be a compiler-writer to follow the rationales laid out here. It provides some interesting insight into the way the standards process works and the way that decisions get made by a team or by one person who is strongly committed to "doing it right this time." However this is no dry committee report or academic paper: you will find the word "I" throughout the paper, along with anecdotes about conversations, code written out quickly to help guide a decision, and other vignettes that make this must reading for all we C++ people.
Some quotes (words outside "" or in  are mine, not Herb's):
- "Many C++ programmers tried hard to use [Managed Extensions], and most failed."
- Mapping destructors to dispose bidirectionally (probably my favourite C++/CLI feature) was "nontrivial, and required C++/CLI to influence CLI to modify and regularize its pattern)."
- "There comes a point where you have to admit that you’re trying too hard." (On having a class that inherits from System::Object magically be a ref class without having to use the keyword, an idea that wouldn't have been good anyway since it would have ruled out mixed types.)
- "Having private as a default matters so much that Stroustrup correctly felt it was worth the high cost of taking a new keyword just to have a category of user-defined types where the default was private." (In a section drawing parallels between some C++/CLI decisions and the decades-old decision to add class to a language that already had struct.)
- "...in the C++/CLI design effort, some people tried hard to leave open the possibility of allocating C++ objects physically on the CLI heap; that is impossible in general, and trying to persist in this led to confusions in the type system that have now been avoided and removed." (Ouch!)
- "As for whether this set of extensions amounts to a different superset language, a compatible dialect, and/or a binding: I think you can find reasonable people who view it any of those ways. Whichever noun you prefer, it is the most compatible set of extensions I know of to any programming language, standard or otherwise, including for nearly all macro cases — which are notoriously next to impossible to support in a compatible way. Achieving that required putting requirements in C++/CLI that placed a greater burden on compiler writers in favor of preserving strong ISO C++ compatibility and avoiding conflict with C++0x evolution, and improving programmer usability so that programmers would use the feature instead of switch to another language (unlike with the Managed Extensions). These choices reflect the designers’ great respect for ISO C++."
The paper closes with an FAQ that includes questions I can only describe as rude. I am guessing that Herb has been patiently answering these in email and at meetings for many years now.
If you still aren't really clear on WHAT the C++/CLI version of C++ is, what happened to the underscores, or how C++ can be the best .NET language of all (offering features C# and VB just cannot offer) then this paper might not be the place to start, since it's not a syntax review or a tutorial. But then again, maybe understanding the WHY will motivate you to go and learn the WHAT. And if you want more WHY, the paper is liberally sprinkled with links to blog entries by Herb and Brandon (mostly in 2003) with even more details.
Go! Read it, now!
Saturday, February 25, 2006
I have no clue who would come up with a number such as that, but anyone who approaches me with a cheque for $17,500 (or should I say check, I bet that's US dollars) is very likely to become a proud blog-owner :). And that's a 54 cent discount!
Monday, February 20, 2006
Visual Studio Team Systems is a huge product... diagramming tools, code generators, source control, work item tracking, project management, documentation generators, and much more besides. Some people I know have already decided to adopt VSTS because of one set of features, but really don't know how to use some of the other features. Others are still undecided about whether they want it, or which "stack" - tester, architect, developer, or all three in the Suite product - they want.
Why not attend a two-hour session that will help you to see what you can do with this amazing technology?
The abstract I received says "This session is intended to provide an introduction to Visual Studio Team System, highlight the new functionality and business value in each offering, and outline the transition steps for existing Visual Studio and MSDN customers. We will also demonstrate Visual Studio Team System in action." Why not check it out while there are still spaces available?
Wednesday, February 15, 2006
There's good news and bad news on the "C++ product team blog" front. The good news is that Nikola Dudar has a new entry after about three months of silence. The bad news is that it's to announce that STL/CLR will have to wait a little longer. It slipped out with beta 2 but it's not in the release version, and was planned as a web download. But the team is heads-down on a number of fronts and this is one of the items that has had to be postponed. The big focus is MQ, an internal milestone that all the languages and tools are working on.
Patience is a virtue,
Monday, February 13, 2006
As someone commented the other day at a presentation I was doing, I still have VS 2005 in a VPC and not on my base machine. Why? Well I have a big ASP.NET project finishing up that is all done in 2003 (an Enterprise client, not an early adopter at all and it's been 18 months since we started) and I was just a little nervous that if I put the 2.0 Framework and the like onto my laptop that I would mess things up. I had no proof of that, and no time to go find out one way or the other, it was just a gut worry born of spending 25+ years doing this stuff. I decided to use the 2005 VPC for demos and playing with the new tools and carry on with 2003 on the actual metal.
Well today someone gave me a way cool tool that I really wanted to use -- and it needed the Framework 2.0. I decided to give it a whirl. The actual installation was nice and quick and didn't even require a reboot (though the installer did insist on my closing a few things I didn't think were framework dependent.) Then, cool tool installed, I went back to my final bug triage on the ASP.NET project, and when I brought up a report (using the ReportViewer control on the aspx page):
The report server cannot decrypt the symmetric key used to access sensitive or encrypted data in a report server database. You must either restore a backup key or delete all encrypted content and then restart the service. Check the documentation for more information.
Aaaargh! I have no clue how to restore a backup key, or what my encrypted content is and how I would feel about deleting it! So what to do? Toss that string into a search engine and you'll find links to a KB article that says "oh, you should have done xyz before you changed the user account that SRS runs under." The resolution is of no help to anyone who accidentally did so (and no, I didn't think that installing a new version of the framework would change the user account under which SRS runs.)
I uninstalled and reinstalled SRS, then redeployed my reports by opening each 2003 solution that I'm actively using on this machine, right clicking the Reports project in each and choosing Deploy. Took less than half an hour counting the near panic attack when i first got the message. But that's not a strategy for the production machine, so I just added another ToDo to the post-go-live list, since the client is sure to want the Framework 2.0 on that machine eventually.
Friday, February 03, 2006
One of the main "deliverables" of a code camp is to attract attendees who don't normally go to conferences, launches, or even user group meetings. Another is to attract first time speakers. I love seeing "that look" on someone's face, when they are fresh off the stage, they gave their talk, the demos worked and they are still alive! Little do they know they're hooked at that point .
Here are some blog entries by brand new speakers at the Toronto Code Camp:
- Paul Scarlett wrote to DotNetRocks about the experience... his link is to Carl reading the letter and then Carl and Richard talking about how terrific we all are . If you poke around elsewhere in his blog you will find various other postings describing the speaking experience for Paul.
- Shaun Hayward blogs about his Code Camp experience... he liked it so much he's the speaker for February's meeting of the East of Toronto .NET User Group. (Register now!)
Congratulations guys, and welcome to the club!
Thursday, February 02, 2006
Let's say for the sake of argument that you own a small Canadian business and you are about to employ a child of yours to work in that business. You know that you don't deduct Employment Insurance (EI) premiums from yourself, because you own more than 40% of the company. But what about your child? So you search a little and you find two official government websites (.gc.ca means Government of Canada .ca). Here is what they say:
If you are a family member, i.e. spouse or child, paid as an employee by the family enterprise —business or farm— you are like any other worker and can be paid EI benefits, as long as you meet the requirements for regular or maternity, parental, sickness and compassionate care benefits.
Even if there is a contract of service, employment is not insurable and is not subject to EI premiums in the following situations:
- casual employment if it is not for your usual trade or business;
- employment when you and your employee do not deal with each other at arm's length. There are two main categories of employees who could be affected: related persons and non-related persons.
- Related persons: These are individuals connected by blood relationship, marriage, common-law relationship, or adoption. In cases where the employer is a corporation, the employee will be related to the corporation when the employee is related to a person who either controls the corporation or is a member of a related group that controls the corporation.
That's right, HRSDC Canada says go ahead and deduct, your kids are just like anyone else and they will be eligible. But CRA-ARC, which is the organization that will punish you if you get this wrong, says don't deduct.
What do you do? You might consider phoning the government. This will be entertaining in a way, what with listening to the hold music, playing voice mail hell, and listening to government employees say "oh gee I didn't know that", but not what you might call educational. But after several such phone calls, you can discover that it is possible to request a written ruling from the tax people. And then you resolve to do whatever the ruling says to do and stop worrying your pretty little head about what makes sense or what is right. And take some satisfaction, if you're that kind of person, in knowing that many of the "I didn't know that" guys have promised to show their boss the contradictory information.
Tuesday, January 24, 2006
The word is starting to spread about the concurrency skills we are all going to need sooner rather than later. And work is underway at dev-tool-makers to offload some of that work to the "system" -- maybe the language, the compiler, a library, the framework, the operating system -- anything other than the programmer because most of us are even worse at threads-and-locks than we were at malloc-and-free or new-and-delete or any other kind of memory management.
If you were wondering about Microsoft's committment to this (and the PDC talks on the topic weren't enough to convince you) then read Kang Su's latest blog entry about the new Bay Area Office they are establishing for this sort of progress... and wait till you see who's going to be working there...
© Copyright 2023 Kate Gregory
Theme design by Bryan Bell
newtelligence dasBlog 2.3.9074.18820
| Page rendered at Sunday, February 05, 2023 12:23:18 AM (Eastern Standard Time, UTC-05:00)
On this page....
Pluralsight Free Trial