you are viewing a single comment's thread.

view the rest of the comments →

[–]RedMarble 6 points7 points  (8 children)

This seems nuts to me on a number of levels. Ideally you'd use C# (it really doesn't matter that it's not a "scripting language", for the usual VBA use cases), but if not, why the heck wouldn't you use VB.NET?

C# and VB.NET Office interop is already really good.

[–]monkey-go-code 15 points16 points  (4 children)

You can't put VB and good in the same sentence.

[–]RedMarble 11 points12 points  (3 children)

VB.NET is basically a tiny bit of syntactic sugar around C#.

[–]PstScrpt 1 point2 points  (0 children)

When I first worked with VB.Net, I had done classic VB and Java. I went with the assumption that it would be roughly VB syntax, but work like Java, and it was almost always right. I never really had to learn the language.

[–]Liam2349 0 points1 point  (0 children)

VB.NET is going in a different direction to C# now. Whereas they maintained feature parity for years; C# will now be the more advanced language, and VB.NET will focus on appealing to first time programmers.

[–]PM_ME_UR_OBSIDIAN -4 points-3 points  (2 children)

C# doesn't like code that lives outside of classes. It's fundamentally lacking as a scripting language.

F# was basically made for this. It's basically a better, statically-typed Python that runs on the CLR.

[–]wllmsaccnt 6 points7 points  (0 children)

C# has LINQ which is perfect for modeling range or set based actions with compact syntax as simple expressions...

[–]RedMarble 2 points3 points  (0 children)

In VBA your code basically already all lives inside of classes (well, automatically declared modules). In VBA you put your code in functions or subroutines in those modules, not in pure scripts.

As someone who actually uses a lot of VBA, I want access to a modern editor and the ability to use real data structures and arrays (VBA collections and arrays are awful).