Author Topic: In for a tough time  (Read 26540 times)

0 Members and 1 Guest are viewing this topic.

Nathan Taylor

  • Guest
Re: In for a tough time
« Reply #30 on: March 05, 2007, 10:39:30 PM »
I have better things to do with my time than needlessly learn a new language.

VB.NET is a new language. It is not really similar to VB6 or VBA.

VB.NET is not a new language syntax. The syntax differences are minor. It is only the useage of the .NET framework which is the big difference.
I would have wasted time learning C# syntax when I could have spent time learning the .NET framework and AutoCAD's .NET API.

TR

  • Guest
Re: In for a tough time
« Reply #31 on: March 05, 2007, 11:03:54 PM »
I have better things to do with my time than needlessly learn a new language.

VB.NET is a new language. It is not really similar to VB6 or VBA.

VB.NET is not a new language syntax. The syntax differences are minor. It is only the useage of the .NET framework which is the big difference.
I would have wasted time learning C# syntax when I could have spent time learning the .NET framework and AutoCAD's .NET API.
I never claimed it was a new language syntax. The best way I can describe the differences is VB.NET is a "polished turd".

Nathan Taylor

  • Guest
Re: In for a tough time
« Reply #32 on: March 05, 2007, 11:22:08 PM »
The best way I can describe the differences is VB.NET is a "polished turd".

Only your opinion of course.

jjs

  • Guest
Re: In for a tough time
« Reply #33 on: March 05, 2007, 11:28:11 PM »
the best way I can describe the differences is VB.NET is a "polished turd".
I thought in the other thread, someone said I could not polish one of those.

Now I am confused.

Also, if I can take reflector and change my vb.net code into c# code. How can one be better than the other, especially when I know most of the syntax for the one? Hard cold facts would be appreciated. Name calling does not help me make an informed choice.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: In for a tough time
« Reply #34 on: March 05, 2007, 11:38:31 PM »
..
Now I am confused.
...


No you're not .. don't try to trick me :-)

Whatever I say, someone is going to get their back up .. so I'll just walk away.  I don't want to start a pissing contest in here.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<--

MickD

  • King Gator
  • Posts: 3520
  • (x-in)->[process]->(y-out)
Re: In for a tough time
« Reply #35 on: March 05, 2007, 11:42:21 PM »
basically they do both compile to IL (there 'may' be very minor differences but none that would have any real effect), the main advantage with learning C# is to learn a bit of 'C' type syntax and a more concrete OOP environment. Another good reason is that java is a snap to learn after C# and a handy language to also have under your belt.
Forth is like the Tao: it is a Way, and is realized when followed.
Its fragility is its strength; its simplicity is its direction - Michael Ham

"The E in Javascript stands for 'easy'." Florin Pop tweet

sinc

  • Guest
Re: In for a tough time
« Reply #36 on: March 06, 2007, 12:44:38 AM »
The best way I can describe the differences is VB.NET is a "polished turd".

 :lmao:

I agree.  Only my opinion, too, of course.  Of course, if VB.NET is a "polished turd", C++ must be the raw steaming version...   :-D

But to give a serious answer, I simply don't like VB syntax.  Some people like it because of the lack of curly braces, but it just irks me.  From the DIMs to the LOOPs, I just really hate the syntax.  Simply a matter of personal preference.

I've only been using C# for a couple of weeks now, but I have to admit I rather like the language.  Maybe not as much as Objective-C, with its categories and protocols and message-based implementation, but it's not bad.  And it's SSSOOOOO much nicer than Lisp, which is what I had been using for most of my recent coding.  Haven't had enough experience with C# or MSIL to know what I think of them for commercial software development, but they work well for customizing Autocad.

Quote
"Tony Tanzillo" <tony.tanzillo@THE_URL_BELOW.com> wrote in message news:<5507199@discussion.autodesk.com>...

  - Basic concepts of sofware engineering

  - The development tools

  - The .NET framework

  - The AutoCAD .NET managed wrapper API
    for ObjectARX.

Equally as important is the order they appear in....

IOW, trying to do it backwards is just not going
to work ;)

That's true.  But for someone who has firm grounding in most of the concepts, the lack of examples and generally-poor state of the documentation - especially for the Civil-3D API - makes things unnecessarily difficult.

I've only been hammering through the .NET API for a couple of weeks now, but I've discovered a lot of things that were a real pain to discover, simply because of the state of the documentation.  And then there are a number of things that seem like they should work, but they don't, because of something Autodesk did.  And then there's the bugs, and errors in the API, of which I've already found several.  So it seems like a good set of examples would serve a lot of common good...

Does anyone have interest in creating a Swamp.NET library?  To see what I mean, take a look at the source code on this page.  The three classes in the "AutocadUtilities" directory illustrate the beginnings of a C# Autocad .NET library.  The other classes in the project implement four Autocad commands, and illustrate how the library routines are used.  All of these particular routines require Civil-3D to run, but the concept holds for all Autodesk products.  I know that a lot of people like to keep source code for stuff like this private, but I feel greater value can be realized by distributing it.  That way, more people will understand how to create customizations, which will change people's ideas of what they can do with the product, which will result in more good ideas creeping into the public domain, which is good for all Autocad users in general.

A Swamp.NET library would serve a dual purpose - in addition to illustrating how to customize Autocad, and it would also fill in the gaps in Autodesk's API, so that not everyone would have to "reinvent the wheel" so much.  That would give people more time to write the USEFUL stuff, rather than fighting through nuts-and-bolts.

At the moment, I've only implemented a small set of functionality.  But eventually, it could become a relatively full-fledged library, which we could compile into a "SwampLib.DLL" for general use.  Kind of an informal open-source effort, which provides useful utilities to other users, and at the same time serves as an example of how to perform various tasks.  For example, since Autodesk did not expose the FeatureLine API in Civil-3D, I went to lots of extra brain-damage in order to figure out how to do basic work with FigureLines.  There's no good reason that every other person who wants to customize Civil-3D FeatureLines should have to go through the same brain-damage.  Instead, they could just use the CurveUtil routines from the SwampLib.

Don't know if it would be practical or not.  It might only work if the library had a single person to work as "editor", otherwise it might deteriorate into chaos.  That might be an awful lot of work.  And we'd undoubtedly need seperate libraries, one for Vanilla and one for each vertical app, so it might require multiple "editors".  Could turn into a lot of effort.  But just thought I'd throw the idea out there, and see what people thought.  In any case, I intend to keep posting the source code for my Civil-3D utilities on our companies web page, at least for the time being, so there's at least that much for people struggling with the Civil-3D .NET API.

Chuck Gabriel

  • Guest
Re: In for a tough time
« Reply #37 on: March 06, 2007, 08:12:46 AM »
the best way I can describe the differences is VB.NET is a "polished turd".
I thought in the other thread, someone said I could not polish one of those.

Now I am confused.

Also, if I can take reflector and change my vb.net code into c# code. How can one be better than the other, especially when I know most of the syntax for the one? Hard cold facts would be appreciated. Name calling does not help me make an informed choice.

Why don't you try a little experiment?  Code up something small but useful in VB.NET, and then use Reflector to convert it to C#.  Then study the C# code side-by-side with the VB code, and try to make some judgments as to which language seems more expressive to you.

Mark

  • Custom Title
  • Seagull
  • Posts: 28725
Re: In for a tough time
« Reply #38 on: March 06, 2007, 08:59:50 AM »
Quote from: sinc
Does anyone have interest in creating a Swamp.NET library?
I would be interested. I'm no C# programmer but if I could some of the basics behind me and actually create something useful then I'm sure my time spent learning and using C# would increase.
TheSwamp.org  (serving the CAD community since 2003)

jjs

  • Guest
Re: In for a tough time
« Reply #39 on: March 06, 2007, 01:07:18 PM »

Whatever I say, someone is going to get their back up .. so I'll just walk away.  I don't want to start a pissing contest in here.

That is disappointing. Yours was one of the opinions I was most hoping to hear. And I say that with all seriousness. Please do share.

Chuck Gabriel

  • Guest
Re: In for a tough time
« Reply #40 on: March 06, 2007, 01:19:12 PM »
Why don't you try a little experiment?  Code up something small but useful in VB.NET, and then use Reflector to convert it to C#.  Then study the C# code side-by-side with the VB code, and try to make some judgments as to which language seems more expressive to you.

On second thought, I'm not sure that's such a great idea.  You would probably get C# code that employed VB coding techniques instead of more organic looking C#.  It probably wouldn't be very helpful in the end.  Maybe instead you could post something small, written in VB, and let one (or more) of the C# gurus rewrite it in C# for you to study.  I'd be willing to convert anything sufficiently trivial, but I'm definitely not one of the most experienced C# programmers here.

By the way, Kerry thinks C# rules and VB drools. :D

jjs

  • Guest
Re: In for a tough time
« Reply #41 on: March 06, 2007, 01:49:43 PM »
By the way, Kerry thinks C# rules and VB drools. :D
I figured that much, I just want to know why he thinks that.

Actually Chuck, I would be interested why you chose C# over VB.net also.

Chuck Gabriel

  • Guest
Re: In for a tough time
« Reply #42 on: March 06, 2007, 02:53:27 PM »
I was hoping not to taint your thinking, but I find C# to be less verbose and more expressive than VB.  You know I've done my share of VB, and I still use it from time to time, but I don't miss things like "Dim i as Integer" or "Function foo(ByRef val as Double) as Double" when I'm coding in languages with C-like syntax.  I vastly prefer "Int i = 0;" and "double foo(double& val)."

I know those are only small things, but there are other little bits of syntactic sugar that, when taken in concert, make C# feel more elegant and concise than VB to me.

Draftek

  • Water Moccasin
  • Posts: 1501
Re: In for a tough time
« Reply #43 on: March 06, 2007, 03:28:17 PM »
And besides, We will call you a toy programmer if you decide to go with VB. :evil:

And not just behind your back...
Soli Deo Gloria

MickD

  • King Gator
  • Posts: 3520
  • (x-in)->[process]->(y-out)
Re: In for a tough time
« Reply #44 on: March 06, 2007, 04:00:09 PM »
The only minor way I can see vb.net being any different to c# in what it produces (IL) would most likely be in code structure , say 'for' looping or similar and it would most likely be because of a minor difference in syntax. Any difference would be more than likely the placement of instructions and branching in IL and perhaps a hanfull of extra intructions, as mentioned you would have to try it out and see if it would have any realistic impact.
Any language that can produce IL basically uses the .net library (and others) extensively and it doesn't matter what language you use these lib's are/produce identical IL, your coding and it's structure produces the rest and in the scheme of things is a lot less code compared to what's hidden behind the scenes being used in the lib's.
I don't think it matters all that much what language you use for things like customising AutoCAD or Office software etc., most of the code is already written for you anyway.
Forth is like the Tao: it is a Way, and is realized when followed.
Its fragility is its strength; its simplicity is its direction - Michael Ham

"The E in Javascript stands for 'easy'." Florin Pop tweet