tag:blogger.com,1999:blog-5430866.post113045595063798325..comments2024-01-02T08:54:14.406-05:00Comments on Peter Bromberg's UnBlog: Flash! Legitimate use for VB.NET found!peterbromberghttp://www.blogger.com/profile/18173639411723574123noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-5430866.post-1132089572458243742005-11-15T16:19:00.000-05:002005-11-15T16:19:00.000-05:00And Juval would not play you wrong, dood.And Juval would not play you wrong, dood.peterbromberghttps://www.blogger.com/profile/18173639411723574123noreply@blogger.comtag:blogger.com,1999:blog-5430866.post-1132088283122310682005-11-15T15:58:00.000-05:002005-11-15T15:58:00.000-05:00Fair comment - I admit I use to be a VB6/VBA devel...Fair comment - I admit I use to be a VB6/VBA developer so I naturally gravitated towards VB.NET (although I was a Turbo Pascal programmer before that).<BR/><BR/>However I learnt C# because:<BR/><BR/>1.It doesn't take long<BR/>2.Juval Lowy advises enterprise system developers to use it<BR/>3.It adds 37% to my market value<BR/><BR/>But I keep using VB.NET because I'm more productive with it - just the maths.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5430866.post-1131718074540092082005-11-11T09:07:00.000-05:002005-11-11T09:07:00.000-05:00Regarding objects supporting interfaces at design-...Regarding objects supporting interfaces at design-time, that's certainly a nice feature of VB.NET.<BR/><BR/>However the "is" and "as" keywords in C# handily solve this issue. <BR/><BR/>I really wonder how many programmers REALLY don't know whether an object they are about to code against "IS A" somethingorother?<BR/><BR/>If you are making language choice decisions based on small stuff like this, I suspect that it may reflect "personal baggage" preferences more than facts, figures and arithmetic.peterbromberghttps://www.blogger.com/profile/18173639411723574123noreply@blogger.comtag:blogger.com,1999:blog-5430866.post-1131366408161248812005-11-07T07:26:00.000-05:002005-11-07T07:26:00.000-05:00P.S to the above - I've just discovered that VB.NE...P.S to the above - I've just discovered that VB.NET rather nicely tells you at design time whether or not an object supports an interface. Thus saving the lazy programmer the trouble of defensively querying for an interface. It does it with Ctype function too! None of this rubbish for me:<BR/><BR/>IMyInterface obj;<BR/>IMyOtherInterface obj2;<BR/>obj = new MyClass();<BR/>if (obj==null)<BR/>{<BR/>obj.SomeMethod();<BR/>}<BR/><BR/>obj2 = obj as IMyOtherInterface();<BR/>if (obj2==null)<BR/>{<BR/>obj2.SomeOtherMethod();<BR/>}<BR/><BR/>Instead I can just do this safe in the knowledge that it will compile:<BR/><BR/>dim obj As IMyInterface<BR/>dim obj2 As IMyOtherInterface<BR/><BR/>obj = new MyClass<BR/>obj.SomeMethod<BR/>obj2 = CType(obj,IMyOtherInterface)<BR/>obj2.SomeOtherMethod<BR/><BR/>B****cks to coding those middle tier components in C# methinks!Anonymousnoreply@blogger.com