- Subject: [slang-users] Can you do OO in Slang?
 
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
 
- Date: Sat, 23 Jan 2021 13:39:37 -0600
 
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]