slang-users mailing list

[2021 Date Index] [2021 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

[slang-users] Can you do OO in Slang?


Hi,
in one of the posts that announced a new libslang version I've noticed a
syntax that seems to be an inheritance, i.e.:

   car = struct { name, price, max_velocity}
   truck = struct {@car, max_load};

Now truck includes all the fields that car has. I wonder however if you can
cast a truck at a car, to pass it to a generic car-related function? Is
there casting in slang?

-- 
Sebastian Gniazdowski

[2021 date index] [2021 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]