is Livecode an OOP language?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Locked
Coffee1633
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 219
Joined: Mon Dec 05, 2011 5:35 pm
Location: Kanagawa, Japan

is Livecode an OOP language?

Post by Coffee1633 » Wed Aug 14, 2013 2:34 am

Before we start getting into the nuts and bolts of programming I have a more theoretical question for those experienced programmers out there. I'm not a programmer by trade so this goes out to those of you who are.

Is liveCode an OOP language?
I have been reading up on modern programming in general and it seems like OOP is all the rage -but I guess it still depends on many factors but anyway... LC sort of seems like it is OOP cause it has objects and a kind of inheritance with behaviors, but you can't create classes which seems critical to the other principles of OOP like encapsulation etc. Yes, I did see that article about creating classes using groups something something way back in a newsletter long ago but that was a real stretch and not by design. The guy had to twist the code into a pretzel to make a class which didn't seem to be efficient and definitely not elegant code

So does LC just do things differently, or does not being able to create your own classes create problems from time to time? This goes out to those of you who use OOP languages.

Just curious
Coffee16

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9823
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: is Livecode an OOP language?

Post by FourthWorld » Wed Aug 14, 2013 3:26 am

It seems the big fashion trend these days is functional programming, but I digress.

LC isn't OOP per se, because it lacks some of the features that purists like to argue about. But it's safe to call it "OOP-like", or perhaps better, "object-based".

With LC you can centralize code in frontScript, backScriipts, and libraries, and you can define behaviors for collections of objects (similar to an OOP class) using behaviors.

With the latest version of LC behaviors can now be chained, so you can effectively create subclasses if you need.

The manual covers all these options pretty well, but for a quick overview see:

Extending the LiveCode Message Path
An introduction to using Libraries, FrontScripts, BackScripts and Behaviors
in RunRev's LiveCode Programming Language
http://www.fourthworld.com/embassy/arti ... _path.html
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Coffee1633
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 219
Joined: Mon Dec 05, 2011 5:35 pm
Location: Kanagawa, Japan

Re: is Livecode an OOP language?

Post by Coffee1633 » Wed Aug 14, 2013 5:31 am

Thanks for the link to Extending LCs Message Path.
Excellent summary of the topic with clear examples.
I'm starting to see LCs place in the hierarchy of programming languages.

Cheers
Coffee16

dbcbos
Posts: 23
Joined: Sun Jun 24, 2012 9:49 am

Re: is Livecode an OOP language?

Post by dbcbos » Wed Aug 14, 2013 2:13 pm

On first thought I was thinking not too highly about Livecode, but since I delved in more. I haven't found much I couldn't do with Livecode that I can do in Java or Visual Basic. Still you need a different thinking cap on then with a language like Java.

Also on a first look I thought of Livecode to be an Event-driven programming language. Which is actually probably what purists would call it.

Still I have discovered with the groups in groups in groups and the behavior scripts. That all four fundemantals of OOP have been implemented and can be used in Livecode.
Someone wrote an article on it: http://newsletters.livecode.com/novembe ... 3b6ef9a03a

BTW I was never in the purist camps ^^, I always was in the camp that made things easier for me and my clients

Locked

Return to “Summer School 2013”