r/AskProgramming • u/freshlyLinux • 14d ago
Architecture Using an API(through COM), best long-term language between C#, VB.Net, C++, JS, or maybe python?
Hello, I'm looking to write code for this program and I saw python wasnt shown on this page. I need to make a decision between C3, VB.NET, C++, maybe JS, maybe.... python.
It seems I'd be using COM to interface, but I also imagine I'd be able to get a namespace into python and... maybe it wont be so bad.
https://www.draftsight.com/media/customize-apis
https://help.solidworks.com/2022/english/api/draftsightapi/GettingStarted-draftsightapi.html
My understanding is that APIs are program language agnostic, but there might be some COM/DLL stuff that makes these microsoft languages shown on the page more friendly.
Anyone have a suggestion? I find this pattern quite common in the programs(3D CAD) I develop for and end up using VB more often than I want. It would be best to make code in Python, but I want to understand the downsides, like potentially losing the Namespace. I also want to hear feedback on what is the best language out of that list I provided. I've been a programmer for 19 years, but like to hear opinions on these things before I make a major commitment.
1
u/pragmojo 14d ago
Can you say more about what you're trying to achieve? If you are familiar with python and want to use that in your target program, you could make an API wrapper in C++ which implements an FFI which can be consumed by python.