What's the equivalent of this in IronPython? Is it just a try-finally block?
using (var something = new ClassThatImplementsIDisposable())
{
// stuff happens here
}
There is nothing equivalent to classes . Its a totally different paradigm. You can use structures in C. Have to code accordingly to make structures do the job.
There's actually quite a few things that can be used for low level programming. Here's some used in the past with advantages over C. Smalltalk and Haskell were used for prototype OS's or OS replacement layers. Cyclone, Popcorn, C0, and Typed Assembly Language do better than C while keeping much of it.
The main difference between C and C++ is that C++ is a younger, more abstract language. C and C++ are both general-purpose languages with a solid community. C is a lightweight procedural language without a lot of abstraction. C++ is an object-oriented language that provides more abstraction and higher-level features.
Because C comes after B The reason why the language was named “C” by its creator was that it came after B language. Back then, Bell Labs already had a programming language called “B” at their disposal.
IronPython supports using IDisposable
with with
statement, so you can write something like this:
with ClassThatImplementsIDisposable() as something:
pass
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With